uSked / mosaico-php-backend

A PHP backend for Mosaico
GNU General Public License v3.0
32 stars 34 forks source link

Email is not responsive #24

Open perlpty opened 7 years ago

perlpty commented 7 years ago

After a lot of reading and testing I managed to build and install Mosaico. At first, I was glad that it appeared to be working with PHP-backend. But when I sent the first TEST to my email address in a desktop enviroment using only the Block "sideArticleBlock" I noted that the image was on top; but because it is a desktop environment it is supposed to be at the left, as it is correctly shown at mosaico PREVIEW (which also works good).

After that, I decided to DOWNLOAD the HTML to see the source code. The Download function also works Good. The HTML showed some things that catched my attention:

Most of lines have this code at the end: 
 I compared to other responsive templates that I found in the web (like foundation, antwort, etc.) and they dont have that character in each line.

The versafix-1 source code does not have this character at the end, so I guessed at that time that the issue could be related somehow to mosaico itself. However, after a long conversation in that threat ( see: https://github.com/voidlabs/mosaico/issues/227 ) it seems that it might be related to the php-backend.

Here I send 2 screenshots to ilustrate the problem. As you can see the target is a desktop email client, so it should display the desktop version.

sc4

sc3

I made this very same test with mosaico demo ( https://mosaico.io/ ) and the email is good in tablet, mobile or desktop.

Please help.

markalston commented 7 years ago

It's probably due to the premailer which isn't needed anymore since mosaico takes care of that now. Try removing the premailer lines and see what you get. I do have an updated fork over at https://github.com/markalston/mosaico-php-backend which has removed the premailer and fixed some other issues. I know that it is months later but I'd love to know if my changes fix this issue.