Good Afternoon...
I have an email function that I have been using for a long time to send mail to our membership.
But now I need to be able to send a .pdf as an attachment to them.
I expect that it should be a pretty simple process, but no clue what it is.
Here is the function that I currently use...
//**********************************************
// Function to send emails
// call with email address / from address / subject / body of message
function mail_sender($to,$from,$subject,$message_body)
{
$message = "<html><head><title>".$sitename."</title></head><body>";
$message=$message.$message_body;
$message .= "</body></html>";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";// More headers
$headers .= "From: <".$from.">" . "\r\n"; // modified function to include $from
$message = wordwrap($message,70);
// Send email
mail($to,$subject,$message,$headers);
}
//***********************************************
What would be the quickest, cleanest, easiest way to attach a .pdf that I have on file in each email...
Thanks in advance for your response.
Douglas