Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Postfix mail server on a LAMP stack. I use phpmailer to send my mail. I recently noticed that major ISP's have added support for the "List-Unsubscribe" header. according to Hotmail, live automatically adds a

You're subscribed to this mailing list. Unsubscribe

I noticed this when checking my Facebook mail. So when I examined the Facebook headers I noticed this line

List-Unsubscribe: <>
X-Priority: 3
X-Mailer: ZuckMail [version 1.00]
X-Facebook-Camp: engage_digest_email
X-Facebook-Notify: engage_digest_email; mailid=523199eG1fe9e7abG0Gd4
List-Unsubscribe: <>

So with my phpmailer setup I added the addCustomHeader() function.

$x = new PHPMailer();
$x->From = "";
$x->FromName = "Veepiz Support";
$x->AddReplyTo("", "Veepiz Support");
$x->WordWrap = 80;                                 // set word wrap to 50 characters
$x->IsHTML(true);                                  // set email format to HTML
$x->Host = "";
$x->Username = '';
$x->Password = 'xxxxxxxx';                
$x->Subject = $o->subject;
$x->Body    = $o->content."\n\n<span style='color:white'>Forgotten your password? go to <a href=''></a></span>";
$x->Body    = str_replace("\r", "\n", wordwrap($x->Body,80));
$x->AltBody = $o->plain_text;
$x->AltBody = str_replace("\r", "\n", wordwrap($x->AltBody,80));
$x->AddCustomHeader("List-Unsubscribe: <>, <$ox->id>");          

Now when I send my mail I get this in my mail headers...

List-Unsubscribe: <>,<>

It seems phpmailer is adding this header and it conforms to the rfc

But in Hotmail I don't get the component showing that i've subscribed to blah blah mailing list unsubscribe

You're subscribed to this mailing list. Unsubscribe

share|improve this question
i cant see any other headers from facebook saying its a list. ive editted post @Zoredache – Sir Lojik Nov 8 '11 at 20:23
What happens if you add only the http url? Or list it first? – Zoredache Nov 8 '11 at 20:24
And look really close at RFC 2369. – mailq Nov 8 '11 at 20:24
@mailq i copied an example from that link List-Subscribe: <>;, <> – Sir Lojik Nov 8 '11 at 20:27
@Zoredache ive tried with email and http url alone and hotmail doesnot add that component.... im i using the phpmailer addCustomHeader function well? public function AddCustomHeader($custom_header) { $this->CustomHeader[] = explode(':', $custom_header, 2); } – Sir Lojik Nov 8 '11 at 20:28
up vote 1 down vote accepted

So you should ask Hotmail. They probably show the component only for trusted newsletters or senders. Who told you that they show this for any mail containing the "List-Unsubscribe:" header.

This header can be used by Phishers and Spammers to make a mail more serious. There is a good chance that Hotmail only accepts these headers from trusted sites.

share|improve this answer
And probably the Spam outbreak from your IP in the beginning of October still echoes back to you. – mailq Nov 8 '11 at 20:42
thx a lot mailq – Sir Lojik Nov 8 '11 at 20:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.