I'm using javamail lib to send calendar invites. I notice exchange server adds this to the text/html part of the mail. The text/plain and text/calendar parts are not modified.
<meta name=3D"Generator" content=3D"Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left:=
#800000 2px solid; } --></style>
This behavior is not noticed when
the invite is received by a non-exchange email like #gmail.com.
when the exact text/html content is sent without the text/calendar part to an exchange email.
I believe exchange server is treating text/html in calendar invites differently, but I'm not able to find a solution that works for both exchange and non-exchange servers.
Outlook prior to 2016 always converted HTML in the meeting requests in RTF (which is/was the native body format for the appointments / tasks / contacts).
What version of Outlook and Exchange are you using?
Related
I am testing some HTML email layout, I am not sure to understand which is the HTML I should consider:
use the HTML as it is sent from my server to mailgun (an email service provider)?
use the HTML as I receive it in raw format in the email I receive?
The difference is that in the raw source I receive there are =3D and =20 characters because of the quoted printable format. I'm using testi# but I suppose any rendering software will do, just it's not clear which version of the HTML should be used (needless to say I see =20 everywhere if it's raw, whereas it's perfect if I use the "pure" HTML)
You should use the HTML as it is before being sent. I'm unsure of how testi# works but with other services such as Litmus & Email on Acid you can send a test to them directly from your ESP and they will process that for the previews.
[Added from comment on question to allow close]
I am sending an HTML e-mail via API whichi s UTF-8, however Mailgun seems to sometime use base64/UTF-8 and sometimes use quoted-printable ascii.
I am having a problem with Outlook 2013 (incorrectly I believe) re-writing the header of the HTML e-mail from UTF-8 to ascii and then not displaying my pound sign: £ as it doesn't exist in ascii.
I suspect this is happening in Outlook 2013 becuase the character encoding of the mime part is ascii and the e-mail is UTF-8. I believe the only way to get round this is to force Mailgun to send the e-mail using base64 mime encoding and UTF-8 but I don't know how to force that to happen using the API.
I am quite sure this is not the best solution but in case it helps anyone, I have simply added a pound sign which is styled white. I know it seems horrible, but I haven't found anything better and it seems to work!
<font style="font-size: 2px;" color="#ffffff" size="2">£</font>
We send out password-reset emails to business partners who use our intranet. The body of the email contains a hyperlink:
`http://www.ourdomain.com/ResetPassword.aspx?token=....`
But some of the people who receive these emails are saying there's an extra dot in the domain name:
`http://www.ourdomain..com/ResetPassword.aspx?token=....`
I do not see where that could be happening in the program I've written. I store the base url in the web.config:
`http://www.ourdomain.com`
and attach the name of the aspx page and append the token to it.
Are there any corporate anti-virus programs out there which deliberately mangle hyperlinks discovered in the body of emails, to render them invalid and thus unclickable?
This seems to be per the spec of quoted-printable encoding. It just so happens that the length of text in the message breaks to a new line right at the .com (72 characters maybe?). Please verify that this is the case by sending yourself a message and analyzing the quoted-printable source of the message.
System.Net.Mail creating invalid emails and eml files? Inserting extra dots in host names
The solution would be to not use quoted-printable encoding if some email programs cannot correctly interpret the spec.
plainText.TransferEncoding = System.Net.Mime.TransferEncoding.SevenBit;
//or base64
I have sent Google Talk chats that are HTML in the way described by this question: How do you send HTML formatted messages over XMPP with Node.JS?
However, Gtalk seems to just interpret it as text. Does Gtalk accept HTML formatted messages?
To respond to the comment below: it could be either the client or the server that Google runs which is interpreting it incorrectly.
Yes, Google Talk accepts HTML formatted messages. However, as you observed, it disregards the formatted text and only shows the plain text. According to the XHTML-IM XEP, every HTML message must be accompanied by a plain text message for compatibility with clients that do not support HTML formatted messages.
When I send this example message to the Google Talk client on my Windows machine (using Psi's XML input console)...
<message to="test#gmail.com/Talk.v10445D0E8B1">
<body>Wow, I'm green with envy!</body>
<html xmlns='http://jabber.org/protocol/xhtml-im'>
<body xmlns='http://www.w3.org/1999/xhtml'>
<p style='font-size:large'>
<em>Wow</em>, I'm <span style='color:green'>green</span>
with <strong>envy</strong>!
</p>
</body>
</html>
</message>
... I just see the text Wow, I'm green with envy!.
When I send the same message to my Psi client logged in to Google Talk, I receive...
<message from="test#jabber.org/Ben-PC" to="test#gmail.com">
<body>Wow, I'm green with envy!</body>
<html xmlns="http://jabber.org/protocol/xhtml-im">
<body xmlns="http://www.w3.org/1999/xhtml">
<p style="font-size:large">
<em>Wow</em>, I'm <span style="color:green">green</span>
with <strong>envy</strong>!
</p>
</body>
</html>
</message>
It was not stripped from the HTML, exactly as I expected (servers should not change the contents of messages). It shows as , so it looks like Psi does support formatted text.
The way to test for capabilities is using Service Discovery. If I send...
<iq to='test#gmail.com/Talk.v10445D0E8B1' type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
... I receive...
<iq from="test#gmail.com/Talk.v10445D0E8B1" type="error" to="test#jabber.org/Ben-PC">
<query xmlns="http://jabber.org/protocol/disco#info"/>
<error type="cancel" code="501">
<feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
</iq>
... which means the Google Talk client does not support Service Discovery. We have to rely on the observation that HTML message text is ignored by the Google Talk client and server.
I am creating an email in MFMaiilComposeViewController and if I simply create some html snippets and assign them to the message body - all is well. The resulting email (in GMail and Yahoo) looks like the original HTML I sent.
[mailMan_ setMessageBody:body isHTML:YES];
On the other hand, if I also include an XML attachment, my email reader renders everything as plain text … including, the XML inlined. IE: my mail client (GMail, Yahoo) shows the raw HTHML and XML tags - including html tags that I didn't supply - ie: the html, head, body tags the iPhone provides around the content:
NSData *opmlData = [[NSData alloc] initWithData:[opml dataUsingEncoding:NSUTF8StringEncoding]];
NSString *fileName = [NSString stringWithFormat:#"%f.opml", [NSDate timeIntervalSinceReferenceDate]];
[mailMan_ addAttachmentData:opmlData mimeType:#"text/xml" fileName:fileName];
I pop3'd the mails to see what was happening and found that WITHOUT an attachment, the resulting html section of the email contains this block:
--0-1682099714-1273329398=:59784
Content-Type: text/html; charset=us-ascii
<html><body bgcolor="#FFFFFF"><div><h2 style="b
while on the other hand, WITH the XML attachment, the iPhone is sending this:
--0-881105825-1273328091=:50337
Content-Type: text/plain; charset=us-ascii
<html><body bgcolor="#FFFFFF"><div><h2 style="bac
Notice the difference? Look at the Content-Type … text/html vs text/plain. It looks like when I include an XML attachment, the iPhone is errantly tagging the HTML version of the body as plain text! Just to clarify, technically, both with and without the attachment, the iPhone also includes this:
--0-881105825-1273328091=:50337
Content-Type: text/plain; charset=us-ascii
Notebook
Carpentry
Bathroom floor tile
Bathroom wall tile
Scrape thinset
But this obviously isn't where the problem lies.
Am I doing something wrong? What must I do to actually "attach" XML without the iPhone labeling the entire HTML body as plain text. I tried reversing the assignments (attachment first and then body) but no luck.
For what it's worth, the email looks perfect from the iPhone's sending interface. Indeed, the HTML renders correctly and the attachment looks like a little icon at the bottom of the message. This problem has more to do with what the iPhone is actually sending.
Turns out - this problem is specific to Yahoo.
On the iPhone, if I change my provider to my Gmail account instead of my Yahoo account, the resulting email has more sections, is much more specific and renders correctly.
Moral of the story - be careful sending attachments from your iPhone via different providers.