• 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!

Email SPF stuff

xoggoth

More fingers than teeth
Thanks received
1,183
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();
 
Last edited: 12:23
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();

just use Amazon's SES it will cost you peanuts and remove the pain for ever more.
 
Hey Xog,

Who is your domain registered with? Do a search for "myisp spf record" and you should find a guide on how your registrar or DNS provider allows you to add SPF records. Then all you need is the IP address of the box your site is hosted in and you should be able to set it up OK.

That is if the email that is generate is coming from an address@yourdomain.co.uk...

Admin
 
Forgot I posted this. Cheers, look into those.

Googled that and found a decent guide, added spf in error message and fine now. Ta again.

Not sure why correct spf isn't in there by default though as it affects standard client and webmail.
 
Last edited: 10:19

Advertisers

Back
Top