RE: How Can I send mail in php in HTML format?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can use mail() to send html, but you need to set the headers first.
I hope this helps.

Jeremy Schreckhise

 $email_addr = "whereto@xxxxxx";
 $email_from = "foo@xxxxxxx";

 $email_subj = "About What";

 // Set Content-type header
	 
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	 
$email_mess = "<html><head></head><body>Stuff</body></html>";
	 
ini_set('sendmail_from',$email_from);
mail($email_addr,$email_subj,$email_mess,$headers);


-----Original Message-----
From: Tomás Rodriguez Orta [mailto:admin@xxxxxxxxxxxxxxxx] 
Sent: Thursday, July 28, 2005 2:31 PM
To: php-general@xxxxxxxxxxxxx
Subject:  How Can I send mail in php in HTML format?

Hello friends.

How Can I send mail from php in HTML format?.
I use the mail() function, but I dont know doing.somebody can I help me?


Best regards TOMAS


------------------------------------------------------------------------
-
Este correo fue escaneado en busca de virus con el MDaemon Antivirus
2.27
en el dominio de correo angerona.cult.cu  y no se encontro ninguna
coincidencia.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux