Re: Sending a mail in HTML format

From: Date: Sun, 21 Jan 2001 01:55:18 +0000
Subject: Re: Sending a mail in HTML format
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35867@lists.php.net to get a copy of this message
On Sat, Jan 20, 2001 at 06:46:39PM -0700, Pascal Clerin wrote : > I want to send a mail in HTML format with the mail() function. > I have tried to send html stuff in the message parameter, but when I read it > in my hotmail account, I just see the html code and not what the html is > supposed to show. > I suppose that it is necessary to send some additional headers to specify that > the mail is in html format. > Thanks for your help. How about sending yourself a HTML email and examing the headers ? I did that way, worked. To shorten this cycle for you, some hints: Content-Type: text/html; charset="us-ascii" (for example) To include test and html, use the following: Content-Type: multipart/alternative; boundary="----=_NextPart_000_062D_01C079C0.9DFF9B70" Then, in the body This is a multi-part message in MIME format. ------=_NextPart_000_062D_01C079C0.9DFF9B70 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ene mene u ------=_NextPart_000_062D_01C079C0.9DFF9B70 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html><body><h1> ene mene mu </h1></body></html> m. -- Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/ EMail: mfischer@josefine.ben.tuwien.ac.at PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0

« previous php.general (#35867) next »