Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using PHPMailer6 breaks campaigns with the inline powered image #714

Closed
michield opened this issue Nov 25, 2020 · 10 comments
Closed

Using PHPMailer6 breaks campaigns with the inline powered image #714

michield opened this issue Nov 25, 2020 · 10 comments

Comments

@michield
Copy link
Member

With PHPMailer6 I got an error in rendering with the Powered By image.

@bramley can you check if it works for you?

When I send the phpList.com homepage as a campaign, it renders like this

image

The only thing I can find at the moment is that in the source of the campaign, there is no spacing between the Body of the HTML section and the inline image

image

@bramley
Copy link
Contributor

bramley commented Nov 25, 2020

I have tried both phpmailer 6 and 5, also different values for the html encoding and the email shows the phplist home page correctly
image

But this is entirely within my desktop, no external mail server is involved.
Your screenshot seems to show new-line characters (x0A) in the MIME headers being quoted as =0A. Possibly the email is being mangled en route.
Is the result different using phpmailer 5?

@michield
Copy link
Member Author

Do you have the Powered By image enabled?

Yes, it works fine when I switch to phpmailer5

@bramley
Copy link
Contributor

bramley commented Nov 25, 2020

Yes, the powered by image is enabled. I have just sent using gmail smtp and the received email was also displayed properly.
what is the value for HTMLEMAIL_ENCODING? I tried 8bit and quoted printable.

phpmailer 6 seems to have reworked the handling of line breaks but that should have improved the situation rather than making it worse
https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md#version-60-august-28th-2017

@bramley
Copy link
Contributor

bramley commented Nov 25, 2020

I have just sent a test email to your @phplist.com address to see how that is displayed. It will appear to be from my gmail address.

@michield
Copy link
Member Author

Strange, I haven't received it yet. What was the subject?

@michield
Copy link
Member Author

When I set encoding to 8bit it works better, but it has the boundary in the content at the top. That may indicate the issue. I'll keep digging. Sounds like it may be something on my local system, but it's working fine when I switch to an older branch.

@bramley
Copy link
Contributor

bramley commented Nov 25, 2020

Sorry I had not realised that the "send test" had not worked. Should be there now with subject "Test web page".
The google web client seems to make a mess of the layout though, seems to be confused by the rotating images and shows them all (the section with the Raspberry Pi image plus others).

@michield
Copy link
Member Author

Yes, got it this time. Thanks. The source has the same no-empty-line between the HTML content and the inline image, so that saves me trying to figure that one out, because it clearly is not the issue. The HTML page renders perfectly. Hmm. I'll keep looking. Must be something on my local system. I still want to know what it is though.

@michield
Copy link
Member Author

Ok, ran a test sending via gmail and it works fine. You're right about the rendering in Gmail itself, I guess that could do with looking at. So, the problem must be with Mailhog, which is what I use for my local test setup. I will see if I can file a bug report with them.

michield added a commit that referenced this issue Nov 26, 2020
@bramley
Copy link
Contributor

bramley commented Nov 26, 2020

Possibly related to mailhog/MailHog#206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants