note 69462 added to ref.mail
| From: | carlosumanzor at arweb dot com | Date: | Wed, 06 Sep 2006 21:47:59 +0000 |
| Subject: | note 69462 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116782@lists.php.net to get a copy of this message | ||
This is a small function to send html mail:
<?php
function send_mail($to, $sujet, $msg, $from) {
$headers = "MIME-Version: 1.0\r\n".
"Content-type: text/html; charset=iso-8859-1\r\n".
"From: ".$from."\r\n".
"To: ".$to."\r\n".
"Date: ".date("r")."\r\n".
"Subject: ".$sujet."\r\n";
mail($to, $sujet, $msg, $headers); //ta da !
}
$from= "somebody@somedomain.com"; //It's can exits or not
$msj= "<html><head><title>something</title></head><body>Bla
bla</body></html>"; //You must put the full structure of a html page
send_mail('otherguy@otherdomain.com', "some subject", $msj, $from); //call the
function
?>
It's simple and very easy to use.
Bye
----
Server IP: 66.163.161.117
Probable Submitter: 190.10.14.75
----
Manual Page -- http://www.php.net/manual/en/ref.mail.php
Edit -- https://master.php.net/note/edit/69462
Del: integrated -- https://master.php.net/note/delete/69462/integrated
Del: useless -- https://master.php.net/note/delete/69462/useless
Del: bad code -- https://master.php.net/note/delete/69462/bad+code
Del: spam -- https://master.php.net/note/delete/69462/spam
Del: non-english -- https://master.php.net/note/delete/69462/non-english
Del: in docs -- https://master.php.net/note/delete/69462/in+docs
Del: other reasons-- https://master.php.net/note/delete/69462
Reject -- https://master.php.net/note/reject/69462
Search -- https://master.php.net/manage/user-notes.php