I need to send a pdf with mail, is it possible?
$to = \"xxx\";
$subject = \"Subject\" ;
$message = \'Example message with html\';
$header
After struggling for a while with badly formatted attachments, this is the code I used:
$email = new PHPMailer();
$email->From = 'from@somedomain.com';
$email->FromName = 'FromName';
$email->Subject = 'Subject';
$email->Body = 'Body';
$email->AddAddress( 'to@somedomain.com' );
$email->AddAttachment( "/path/to/filename.ext" , "filename.ext", 'base64', 'application/octet-stream' );
$email->Send();