HTML-Mail => OE/OL works & NM doesn't
| From: | J.Keitgen | Date: | Thu, 26 Oct 2000 15:59:37 +0000 |
| Subject: | HTML-Mail => OE/OL works & NM doesn't | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22160@lists.php.net to get a copy of this message | ||
Hello PHP-Programmers,
I am trying to send an HTML-Email... It works
with Outlook and Outlook Express but it does not work with Netscape
Messanger... Why?...
These are the headers I am using...
$boundary = "----=_MIME_" . uniqid("") . "_MIME_";
$boundary2 = "----=_MIME_" . uniqid("") . "_MIME_";
$mailprog = "/usr/sbin/sendmail -t";
$fd = popen( $mailprog, "w" );
fputs( $fd, "To: $email\n" );
fputs( $fd, "From: robot@xxx.de\n" );
fputs( $fd, "Subject: xxx.de Express Service!\n" );
fputs( $fd, "MIME-Version: 1.0\n" );
fputs( $fd, "Content-type: multipart/related;\n");
fputs( $fd, " boundary=\"$boundary\";\n");
fputs( $fd, " type=\"multipart/alternative\"\n");
fputs( $fd, "X-Priority: 3\n");
fputs( $fd, "X-Mailer: xxx.de Express!\n");
fputs( $fd, "Content-Transfer-Encoding: 8bit\n");
fputs( $fd, "Date: " . date("D, d M Y H:i:s",time()) . " +0100\n");
fputs( $fd, "Status: RO\n");
fputs( $fd, "\nThis is a multi-part message in MIME format.\n\n");
fputs( $fd, "--$boundary\n");
fputs( $fd, "Content-Type: multipart/alternative;\n");
fputs( $fd, " boundary=\"$boundary2\"\n\n\n");
fputs( $fd, "--$boundary2\n");
fputs( $fd, "Content-Type: text/html\n");
fputs( $fd, "Content-Transfer-Encoding: quoted-printable\n");
fputs( $fd, " boundary=\"$boundary2\"\n\n\n");
fputs( $fd, "$html_code");
fputs( $fd, "--$boundary2\n");
pclose( $fd );
Thanks
Joseph