Closed Buddierdl closed 2 years ago
Hi @Buddierdl,
thank you for reporting this issue and also for providing the Pull-request. We really appreciate it.
The issue is probably not present only for the Mailgun mailer, so we'll have to look into fixing it for all our mailers. Please allow us some time to work on a full fix (all mailers). We plan to release v3.1 by the end of September (note: the date can change).
So we will test and merge this PR before that release.
Take care!
WP Mail SMTP v3.1.0 was just released and we fixed the string attachments.
Thank you for opening this GH and providing a PR!
I'm going to close this GH issue and PR, since we merged the code from our master repo to this public repo for the lite version of the plugin.
Expected Behavior
When images are added to an email using the
AddStringEmbeddedImage()
function of PHPMailer, they should be attached to the email.Current Behavior
The images stored as a string are ignored and not attached to the email when using the mailgun provider.
Possible Solution
In the
set_attachments
function, we need to check$attachment[5]
, which will be true if the attachment is a string. In that case the$attachment[0]
should be interpreted as the image itself and not as a file location to be read. I will create a commit for this.