4

Hey I'm trying to send emails via php mail().

My webspace is at ALL-INKL. I earlier tried the code on a test-account, and it worked fine, but when I registered a official account I stopped receiving emails.

Here's the code:

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";

some isset()-functions which check the inputs to set valid to 1 ...

$intro ="some intro<br><br>";
    // string breaks after 60 chars
    $message = wordwrap($message, 60);
    $outro ="outo first part";
    $outro .= 'outro';

    // Send
    mail($email.','.$myMail, "my name", $intro.','.$message.','.$outro , $headers);

    if($valid == 1)
    {
        //check errors
        if(@mail($email.','.$myMail, "some intro", $intro.','.$message.','.$outro , $headers))
        {
            echo json_encode("sending successful");
        }else
        {
            echo json_encode("sending not successful");
        }
    }

I hope someone can help me

user2839873
  • 309
  • 2
  • 14

0 Answers0