Email an attached file
| From: | Marie Osypian | Date: | Wed, 28 May 2003 18:08:53 +0000 |
| Subject: | Email an attached file | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28126@lists.php.net to get a copy of this message | ||
I am using something like this example code below to send e-mail and
wondered if anyone could tell me how I could include a file also in this
email if possible.
Thanks in advance.
Marie
EXAMPLE:
$myname = "Me Myself";
$myemail = "myself@email.com";
$contactname = "Mister Contact";
$contactemail = "contact@email.com";
$message = "hello from happy me";
$subject = "Included your file";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$myname." <".$myemail.">\r\n";
$headers .= "To: ".$contactname." <".$contactemail.">\r\n";
$headers .= "Reply-To: ".$myname." <$myreplyemail>\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: Just My Server";
mail($contactemail, $subject, $message, $headers);