Had problems on and off with my shopping cart this week because ordinary php mail() function was not working.
Hosters say they have fixed the problem but in the interim I made some PHPmailer alternatives using host mailer which I could easily switch to if the problem returns. They all work well except that, with BTinternet anyway, the customer email always goes to junk due to an SPF problem. Header says :
"Received-SPF: permerror (encountered permanent error during SPF processing of domain of ....)
This is not just a coding error, I get the same fault sending from a Windows Live Mail account and from the host webmail. Been looking at solutions on net and messing about with settings to no avail. Tried using gmail but that also has a junk problem, perhaps because gmail account not same as from, which ideally needs to be a company email. Any experts on SPF? Ta.
PS: Just in case there are any code settings to fix it:
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->SMTPDebug = 1;
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = "ssl://hp95.hostpapa.com";
$mail->Port = 465;
$mail->Username = $emailreply;
$mail->Password = $password;
$mail->From = $emailreply;
$mail->FromName = $coname;
$mail->AddReplyTo($emailreply, 'E Sales');
$mail->Subject = "Your order to $coname";
$mail->Body = "Thank you for your order\nSee below for a link to any downloads. We aim to dispatch any other items on the same or next working day.\n\n".$message;
$mail->AddAddress($custemail);
$mail->Send();
Hosters say they have fixed the problem but in the interim I made some PHPmailer alternatives using host mailer which I could easily switch to if the problem returns. They all work well except that, with BTinternet anyway, the customer email always goes to junk due to an SPF problem. Header says :
"Received-SPF: permerror (encountered permanent error during SPF processing of domain of ....)
This is not just a coding error, I get the same fault sending from a Windows Live Mail account and from the host webmail. Been looking at solutions on net and messing about with settings to no avail. Tried using gmail but that also has a junk problem, perhaps because gmail account not same as from, which ideally needs to be a company email. Any experts on SPF? Ta.
PS: Just in case there are any code settings to fix it:
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->SMTPDebug = 1;
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = "ssl://hp95.hostpapa.com";
$mail->Port = 465;
$mail->Username = $emailreply;
$mail->Password = $password;
$mail->From = $emailreply;
$mail->FromName = $coname;
$mail->AddReplyTo($emailreply, 'E Sales');
$mail->Subject = "Your order to $coname";
$mail->Body = "Thank you for your order\nSee below for a link to any downloads. We aim to dispatch any other items on the same or next working day.\n\n".$message;
$mail->AddAddress($custemail);
$mail->Send();

Comment