• 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

xoggoth

More fingers than teeth
Joined
Jul 8, 2005
Messages
17,131
Likes received
4,950
Thanks received
1,184
Location
xoggoth towers
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";
}
?>
 
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...
 
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.
 
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.
 
Ta. Yes, posted support ticket, no reply yet.

PS Changed them to use gmail. That works, for now.
 
Last edited: 10:13

Advertisers

Back
Top