Skip to content
Advertisement

PHPMailer won’t send html message with media queries [closed]

I am using PHPmailer to send emails.

JavaScript

tiny for email body

UPDATE 1 both tiny and thunderbird for security reasons removes @media

I have a responsive e-mails with media queries. E-mails come from MySql database. I can send e-mails but after sending phpmailer romemoves media queries. I tested on 2 SMTP mail servers – the same result.

My code looks like this.

send_emai.php

JavaScript

email before sending

JavaScript

after sending
there is nothing, code has been removed

Advertisement

Answer

You have a bias in your question, you assume this has to do with PHPMailer. You disregard your own mailserver, the receiving mailserver and the receiving mailclient. Especially the last could be the culprit.

For instance if you are using Thunderbird.

But other email clients could change the content of emails as well. This is usually done for security reasons.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement