salman_ahad@yahoo.com Posted November 25, 2009 Share Posted November 25, 2009 The mails I sent to folks in my database using mail(function) are going in spam?? Any idea how I rectify this issue? Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/ Share on other sites More sharing options...
dropfaith Posted November 25, 2009 Share Posted November 25, 2009 sorry to cross forum post a link but http://www.codingforums.com/archive/index.php/t-163714.html might help you out a bit Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-965140 Share on other sites More sharing options...
Tonic-_- Posted November 25, 2009 Share Posted November 25, 2009 I've had a similar issue, have to tried setting the global header in the form? like <?php mail($to, $subject, $message, "From $email"); ?> Usually adding the proper header insures it does not go into the spam or bulk folder on most mail services. Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-965143 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted November 25, 2009 Author Share Posted November 25, 2009 I am using a header like this, but still no help ?? $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: name@mysite.com' . "\r\n"; mail($to_email, $subject, $message, $headers); Any more ideas? Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-965150 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted November 25, 2009 Author Share Posted November 25, 2009 Ok i got this from other site the recipient’s spam filter checks if all headers exist in sender’s email and since you are using simple mail() function it will be almost with empty header so that means high risk of spam to solve that problem you need to use some more complicated mailer class and the best solution is to use gmail account as SMTP relay How can I optimize my header more Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-965153 Share on other sites More sharing options...
oni-kun Posted November 25, 2009 Share Posted November 25, 2009 I've seen this problem too on my site. I noticed, when the FROM address is too long, name or address ( such as name00000000@mysite.com ) It'll go to spam, but if it short, it wouldn't. As for headers, yours are 100% fine. There is no 'header'. Webhosts us a single SMTP server most of the time, and if that is blacklisted (another site on host sent spam) than yours is affected as well, possibly not being able to be whitelisted. Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-965170 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted November 25, 2009 Author Share Posted November 25, 2009 My from name is five letter xxxxx@ideatoceo.com I think I should request Godaddy to set me up on different IP ? Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-965207 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted November 29, 2009 Author Share Posted November 29, 2009 Will making my emails as High priority avoid them from going in 'spam' .. .. .. $headers = "MIME-Version: 1.0\n" ; $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\n"; $headers .= "X-Priority: 1 (Higuest)\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "Importance: High\n"; $status = mail($to, $subject, $message,$headers); my emails are still going in spam, help me Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-967322 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted November 29, 2009 Author Share Posted November 29, 2009 In my hosting provider service(godaddy) I have edited my spf value v=spf1 a mx ptr ip4: xx.xx.xxx.xxx mx:mailstore.server.net mx:smtp.server.net +all My SRV or AAAA records under DNS are still empty. Do I need to edit that too? Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-967343 Share on other sites More sharing options...
redarrow Posted November 29, 2009 Share Posted November 29, 2009 Spam can be caused from load of server settings, the server that sends the email might be on a national spam database and blocked...... if a dns record is incorrect it can be that aswell. if sending a email via php and the dns record don't match the domain name also cause spam. emample www.me.com <<< main server with mail server integrated and dns set up correctly. any word here@me.com <<< will work correctly. Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-967358 Share on other sites More sharing options...
abazoskib Posted November 29, 2009 Share Posted November 29, 2009 if you're on a shared host, chances are your ip reputation has been shot to hell. have your users add you to their safe senders list. Quote Link to comment https://forums.phpfreaks.com/topic/182856-mails-going-in-spam/#findComment-967371 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.