Have a PHPMailer routine that has been working fine sending HTML emails to users. Just added ability to include an attachment and it now fails on send with the following error:
PHPMailer Send function failed: Could not instantiate mail function.
Using echos, I have verified that paths to the file(s) are correct, are complete (all the way back to the server's drive letter) and use the "double backslash" when assigning the path variable. Echos verify that the file exists where indicated.
Doesn't matter if the file is a .zip (the normal) or a .pdf or .txt (also used). Same error on both.
When I comment out just the $mail->AddAttachment() command, the email sends fine.
Here is the command (I added the "die" to see if this function was the problem):
if ($mail->AddAttachment($filepath, $name, 'base64', $mimetype) === false)
die("Failed when adding " . $filepath . '<br>');
These are individual emails to a single individual, not a blast going out to hundreds of addresses.
Can anyone point me in the right direction?