Reputation: 12608
I am trying to send an email using phpmailer https://github.com/PHPMailer/PHPMailer to send an email via SMTP. There is a requirement that the email has no content in the body, only an attatchment.
If I neglect to include $body or set $body = '' then I get an error message telling me that 'Mailer Error: Message body empty'
Does anybody know of a workaround or a way to force PHPMailer to accept a blank body>?
Upvotes: 0
Views: 226
Reputation: 37770
It's just a class so make your own subclass, copy the method that throws that error and comment out the check for it. That way you don't need to touch the library.
Upvotes: 1