Mail() PHP Function is not working in MY Infinity Free Website

Hi , Guys
I am trying sending e-mail by mail() PHP function , But it is not working
This is Code I am using

if (@$_POST['send']) {
      @$name = $_POST['name'];
      @$mailFrom = $_POST['mail'];
      @$message = $_POST['message'];
      @$mailTo = "[email protected]";
      @$headers = "From: ".$mailFrom;
      @$txt = "From: ".$name.".\n\n".$message;

mail($mailTo, "You Have Received An E-Mail From AAN PC Website", $txt, $headers);
    }

    if (mail($mailTo, "You Have Received An E-Mail From AAN PC Website", $txt, $headers)) {
        echo '<div class="msg-sent">تم ارسال الرسالة</div>';
      }

         ?>

https://infinityfree.net/support/php-mail/

3 Likes

You are definitely not allowed to use PHP mail function. The TOS (Term of Service states that, and it will result in deletion of account, or a warning).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.