mort Posted September 27, 2006 Share Posted September 27, 2006 Made an eShot so that it sends an email via PHP to a database of emailsWant to make it a multiple stylesheets email, as will be going out to people using outlook, firefox, and entourage (macs). Thing is, like browsers, all email clients read the HTML and CSS differently.Currently I do that with PHP and HTTP_USER_AGENT to decide what the browser is, but obviously cant get PHP to run in email clients as its server side. So any idea how to detect the email browser and specify the stylesheet without PHPcheers Quote Link to comment https://forums.phpfreaks.com/topic/22264-multiple-stylesheets-in-emails/ Share on other sites More sharing options...
ToonMariner Posted September 28, 2006 Share Posted September 28, 2006 You can't - they could open up the email in what ever agent they want you are simply sending mail to an inbox. The only thing you coudl do is ask the user which client they use and store that in the database and use that value to switch style sheest.You shoudl read up on css support in email agents - its not very good.Also web based e-mail like yahoo and hotmail do all kinds of funny things to html emails - like sticking an x on the front of any id attribute value.Best possible result is in-line css and an absolute minimumI have actually resorted to table layouts and using html to do the formatting - not good But works on in the non-standards compliant world of html e-mail. Quote Link to comment https://forums.phpfreaks.com/topic/22264-multiple-stylesheets-in-emails/#findComment-100016 Share on other sites More sharing options...
mort Posted September 28, 2006 Author Share Posted September 28, 2006 hah you were right, it was totally FUBAR'ed when viewed in entourage, as in not one element was in the right place, all the image backgrounds were tiled all over the placenot good lolthanks for the tip though. Any idea about if margins or padding would work for positioning text inside a table? Quote Link to comment https://forums.phpfreaks.com/topic/22264-multiple-stylesheets-in-emails/#findComment-100188 Share on other sites More sharing options...
Ninjakreborn Posted September 28, 2006 Share Posted September 28, 2006 http://www.google.com/search?hl=en&q=css+support+in+email+clientsvery top search result should cover everything. Quote Link to comment https://forums.phpfreaks.com/topic/22264-multiple-stylesheets-in-emails/#findComment-100536 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.