missing-score
01-28-2003, 09:00 PM
Does anyone know how to add an attachment to an email that can be sent with the mail() function. This is what I tried:
$to = "matt@missingscore.co.uk";
$subject = "Attachment Test";
$body = "Is there an attachment?";
$heads = "From: myself@missingscore.co.uk\nAttachments: myfile.gif\n";
if(mail($to,$subject,$body,$heads)){
echo "Message Sent";
} else {
echo "Error in sending";
}
It sends the email, but no from or attachments appear on the email.
Any help would be appreciated.
P.S: Also, if anyone has any good links to file uploaders, could you post them.
Cheers
$to = "matt@missingscore.co.uk";
$subject = "Attachment Test";
$body = "Is there an attachment?";
$heads = "From: myself@missingscore.co.uk\nAttachments: myfile.gif\n";
if(mail($to,$subject,$body,$heads)){
echo "Message Sent";
} else {
echo "Error in sending";
}
It sends the email, but no from or attachments appear on the email.
Any help would be appreciated.
P.S: Also, if anyone has any good links to file uploaders, could you post them.
Cheers