sirnutty1
asked on
PHPMailer CSS
Hi Experts
I am looking for the best solution to use in order to include css styling in html emails that I am sending using PHPMailer.
There seem to be many options and many different ways that clients could potentially handle them.
Most of the suggestions point to using inline styles but others embed, link etc.
What would you suggest as being the best option to go for?
I am looking for the best solution to use in order to include css styling in html emails that I am sending using PHPMailer.
There seem to be many options and many different ways that clients could potentially handle them.
Most of the suggestions point to using inline styles but others embed, link etc.
What would you suggest as being the best option to go for?
If it is simple content you are sending a quick inline style should do the trick. I usually use a styled <div style=""></div> block when sending short emails.
ASKER
Many thanks for your response aldanch.
How about if the content is more complicated. There will of course be some simpler variations but for our weekly newsletter, it would nice to use something will a little design.
How about if the content is more complicated. There will of course be some simpler variations but for our weekly newsletter, it would nice to use something will a little design.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many thanks aldanch
Just did the test as suggested and with a little tweaking, I think that it will work fine. Can you just clarify one extra point for me?
Does it make any difference if the html doesn't have HTML, HEAD or BODY tags in it?
Sincere thanks again for your help.
Just did the test as suggested and with a little tweaking, I think that it will work fine. Can you just clarify one extra point for me?
Does it make any difference if the html doesn't have HTML, HEAD or BODY tags in it?
Sincere thanks again for your help.
Honestly, I don't know. I have sent HTML formatted email using (like I said previously) just plain inline styled DIVs and it appeared to work just fine. I am guessing you could leave out the <html> and <head> tags unless you have CSS in your head.
I am glad I could help! Good luck :)
I am glad I could help! Good luck :)