note 73907 modified in ref.mail by cellog

From: Date: Mon, 26 Mar 2007 01:26:15 +0000
Subject: note 73907 modified in ref.mail by cellog
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-124800@lists.php.net to get a copy of this message
I just spent a few hours working on getting a simple html formatted email to work on outlook. This is the end result: <?php $body="<em>HTML</em> formatted <strong>Message</strong"; $headers = "From: info@example.com \r\n"; $headers.= "Content-Type: text/html; charset=ISO-8859-1 "; $headers .= "MIME-Version: 1.0 "; /*notice there aren't any \r\n after the second two header additions. This is what made this version work correctly*/ mail("john@example.com", "An HTML Message", $body, $headers); ?> --was-- I just spent a few hours working on getting a simple html formatted email to work on outlook. This is the end result: <?php $body="<em>HTML</em> formatted <strong>Message</strong"; $headers = "From: info@mycompany.com \r\n"; $headers.= "Content-Type: text/html; charset=ISO-8859-1 "; $headers .= "MIME-Version: 1.0 "; /*notice there aren't any \r\n after the second two header additions. This is what made this version work correctly*/ mail("john@pacificprime.com", "An HTML Message", $body, $headers); ?> http://php.net/manual/en/ref.mail.php

« previous php.notes (#124800) next »