質問

I have a java code which sends email. When we open same email on webmails then font remains same but when I open that in outlook then font changes. I am not able to figure it out why this is happening ? Same code is showing different output in different environment. Is that a java code problem or outlook/webmails problem ?
This is actually not a show stopper but still need to rectify as soon as possible, because day by day it will become critical defect for me.

役に立ちましたか?

解決 2

your code must be like following.

 <% String fontName="Times New Roman";
String htmlString = "<font face="+fontName+"></font>"; // incorrect without single or double quotes %>

Browser can understand 'fontName' variable without quotes but outlook can't understand it.

<% String fontName="Times New Roman";
String htmlString = "<font face=\""+fontName+"\"></font>";  //double quotes %>

OR

<% String fontName="Times New Roman";
String htmlString = "<font face='"+fontName+"'></font>"; //single quotes %>

他のヒント

Outlook's display of html emails (which I assume you're using due to the use of fonts) most often differs from webmailers, because they use the browser to render the email while Outlook uses the word html engine.

Quote from http://www.howto-outlook.com/faq/wordhtml.htm:

Starting with Outlook 2007, Outlook uses only the Word engine to display and create HTML-formatted emails.

But maybe this can help you: http://kb.mailchimp.com/article/why-does-my-email-look-like-monkey-poop-in-outlook/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top