note 85271 modified in book.mail by mgf
| From: | mgf@php.net | Date: | Thu, 28 Aug 2008 12:58:57 +0000 |
| Subject: | note 85271 modified in book.mail by mgf | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-143927@lists.php.net to get a copy of this message | ||
@Crusiatus Black
23-May-2008 05:00
Code below works without errors
<?php
$Name = "Da Duder"; //senders name
$email = "email@adress.com"; //senders e-mail adress
$recipient = "PersonWhoGetsIt@emailadress.com"; //recipient
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional
headerfields
mail($recipient, $subject, $mail_body, $header); //mail command :)
?>
--was--
@Crusiatus Black
23-May-2008 05:00
You missed a ; at the second line
Code below works without errors
<?php
$Name = "Da Duder"; //senders name
$email = "email@adress.com"; //senders e-mail adress
$recipient = "PersonWhoGetsIt@emailadress.com"; //recipient
$mail_body = "The text for the mail..."; //mail body
$subject = "Subject for reviever"; /subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional
headerfields
mail($recipient, $subject, $mail_body, $header); //mail command :)
?>
http://php.net/manual/en/book.mail.php