Hi,
I am trying to create a mail script that will also send an attachment. The code i have so far goes as follows...
// Mail form starts here
$to = "$email_addr";
$subject = "Your Hosting Information - $domain";
$body = "some message";
if (mail($to, $subject, $body))
{
echo("<p>Message sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>
What code could I add to add an attachment?
Any help would be great!
php mail script w/attachment
Moderators: egami, macek, gesf
- swirlee
- Moderator
- Posts: 2257
- Joined: Sat Jul 05, 2003 1:18 pm
- Location: A bunk in the back
- Contact:
Try this tutorial, or, if you want to avoid reinventing the wheel, just use someone else's mail script, like LibMail, which makes it pretty damn easy.
-
- New php-forum User
- Posts: 27
- Joined: Sat Jul 05, 2003 5:08 pm
- Location: england uk
- Contact:
you could just put a link to a file on ur site, or a image linking 2 ure site etc ... :S much easier
naya