php - mail() headers not preventing mail going to junk mail folders -



php - mail() headers not preventing mail going to junk mail folders -

im using these headers in php create sure emails avoiding junk mail service folder dont seem working well.

$headers .= "content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "from: hello@somebodylovesyou.co.uk <hello@somebodylovesyou.co.uk>\r\n"; $headers .= "reply-to: hello@somebodylovesyou.co.uk <hello@somebodylovesyou.co.uk>\r\n"; $headers .= "return-path: hello@somebodylovesyou.co.uk <hello@somebodylovesyou.co.uk>\r\n"; $headers .= "x-priority: 3\r\n"; $headers .= "x-msmail-priority: normal\r\n";

is there anythin above code u alter or remover might help work?

agreed @marcb: phpmailer dead easy, , stuff you. go here , download it. follow examples here. should , running in 10 minutes.

however, key point should swing you can tell phpmailer send mail service via different method using php's mail() function.

sending mail service via own php server ultimate cause of messages ending beingness flagged spam, because php server not recognised recieving mail service systems legitimate source email. assume it's spam. systems spf , domainkeys can used tell world server legitimate server email, can take time larn , configure, , more time message through 3rd party email servers out there.

with php's mail() function, don't have choice; message sent via php server, , hence unless you've got domain configured carefully, can flagged spam.

but phpmailer, possible send via other routes, such your main smtp server, or 3rd party systems like gmail.

sending via recognised email server solve problems, can done phpmailer (or similar class), not php's built-in mail() function.

again, of dead easy configure phpmailer.

you can spend week bashing head against wall, week setting spf , domainkeys, , month or 2 waiting hotmail , friends start recognising php server legitimate email source.... or can spend 10 minutes learning phpmailer , other 10 or 20 mins re-writing code utilize it, have send mail service via known legitimate mail service server, , have emails accepted immediately. choice.

php email spam

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -