• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

PHP mail problerm

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    PHP mail problerm

    The PHP Worldpay Callback and Paypal IPN scripts in my shopping cart have suddenly stopped sending customer emails although I have not changed them.

    Did a test post to the v simple script below and it says sent successfully but no email is received. Any ideas what might have caused this problem? Ta.

    <?php
    $to = "myemail@btinternet.com";
    $subject = "This is a test email";
    $message = "This is a test email";
    if (mail($to,$subject,$message))
    {
    echo "Mail sent successfully";
    }
    else
    {
    echo "Can't send email";
    }
    ?>
    bloggoth

    If everything isn't black and white, I say, 'Why the hell not?'
    John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

    #2
    At first glance don't you need a from address and does the email server you route the mail through check the from email address...
    merely at clientco for the entertainment

    Comment


      #3
      Cheers. Those three are sufficient according to W3schools, rest is optional, but just in case I did the full version I have been using successfully for months and still nowt.

      $headers = "From: $emailreply"."\r\n";
      $headers .= "Reply-To: $emailreply";
      $title = "Tech copy - Paypal order from $email Status $status";
      $message = "Your order: \n\n$message";
      mail($recipient,$title,$message,$headers,"-f $emailnotify");

      Replaced the mail in my Paypal IPN code with the gmailer form and that works ok so problem is definitely in my host's mailing somewhere. Can't find any relevant settings/error messages.
      bloggoth

      If everything isn't black and white, I say, 'Why the hell not?'
      John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

      Comment


        #4
        Have you tried asking your accountant hosting company? There may be a problem with a server the email is routed via - hopefully, if that's the case, the email isn't lost, just delayed.

        Comment


          #5
          Ta. Yes, posted support ticket, no reply yet.

          PS Changed them to use gmail. That works, for now.
          Last edited by xoggoth; 29 April 2014, 13:27.
          bloggoth

          If everything isn't black and white, I say, 'Why the hell not?'
          John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

          Comment

          Working...
          X