Jump to content

Mail() headers?


adamh91

Recommended Posts

Hey, I've made a mailing list and im having trouble with mail()

It sends the mail each person in the database, but it keeps going in the spam folder =/

i tried using lots of different headers:

$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Organization: vxMailer \r\n";
$headers .= "Content-Transfer-encoding: 8bit\r\n";
$headers .= "Bcc: ".$to."\r\n";
$headers .= "From: vxMailer <".$from.">\r\n";
$headers .= "Reply-To: vxMailer <".$from.">\r\n";
$headers .= "Message-ID: <".md5(uniqid(time()))."@{$_SERVER['SERVER_NAME']}>\r\n";
$headers .= "Return-Path: <".$from.">\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSmail-Priority: Normal\r\n";
$headers .= "X-Mailer: Microsoft Office Outlook, Build 11.0.5510\r\n"; //hotmail and others dont like PHP mailer.
$headers .= "X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441\r\n";
$headers .= "X-Sender: ".$from."m\r\n";
$headers .= "X-AntiAbuse: This is a solicited email for - vxMailer mailing list.\r\n";
$headers .= "X-AntiAbuse: Servername - {$_SERVER['SERVER_NAME']}\r\n";
$headers .= "X-AntiAbuse: User - ".$from."\r\n";

 

Those headers dont send at all, ive tried all combinations i found on google and it just wont work. any help? thanks.

Link to comment
https://forums.phpfreaks.com/topic/41013-mail-headers/
Share on other sites

First of all you don't really need all these headers - especially the "Message ID=" header - A unique message ID will be generated for your email by your SMTP server  - Autogenerated headers like these can often get you marked as spam so they really are counter productive in many cases - The "From" header is required and you can use the "Reply_to" The message format headers are probably ok ("MIME Version","Content-type" & "Content-Transfer"

 

I'd check your own IP address against RDNS blacklists - if your IP address is blacklisted then there's next to nothing you can do with

headers to clear the problem - www.dnsstuff.com has a good multi blacklist look up (as well as a lot of other very useful tools) look for the Spam Database Lookup test

 

EDIT : Oh and unfortunately there is an mass emailing tool known as VXMailer which many spam filters trap - most only are looking for VXMailer on a "User-Agent" Header but some may be less conservative - unfortunately this is the same as your mailing list name (at least ignoring case) - I wouldn't be suprised if that's triggering the problem

Link to comment
https://forums.phpfreaks.com/topic/41013-mail-headers/#findComment-198619
Share on other sites

I tried the original headers but changing the vxmailer parts, still no luck =/

Then i tried:

$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "Content-Transfer-encoding: 8bit\r\n";
$headers.= "From: ".$from."\r\n";
$headers.= "Reply-to: ".$from."\r\n";

Still filtering them 0.o

 

Link to comment
https://forums.phpfreaks.com/topic/41013-mail-headers/#findComment-198634
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.