I'm trying to self-test my email schemas.
My mail is sent with:
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
The original script tag <script type="application/ld+json"> is rendered as <script type=3D"application/ld+json">, when I View Original the marked up email.
This fails the markup tester, but when I manually remove the 3D, it passes the test.
Q1 - Does Google support quoted-printable encoding?
Q2 - Why does the test fail?
Note: On a Rails application I use the Mandrill API to send the email.
1.) Yes, quoted-printable is supported.
2.) You're testing the markup after it had been encoded. You should decode the raw email, then test it.
Related
I am using the TinyMCE 5.8.1 editor against existing data, where the textarea has MIME content:
"MIME-Version: 1.0
Content-Transfer-Encoding: binary
Content-Type: text/html; charset=UTF-8
Dear Steven San, etc etc"
As soon as I call tinyMCE.init the format gets changed, and saving the data the textarea now shows different MIME content:
"MIME-Version: 1.0
Content-Transfer-Encoding: binary
Content-Type: text/plain; charset=UTF-8
Dear Steven San,  etc etc"
All of the HTML formatting seems to be stripped, and the Content-Type changes from text/html to text/plain.
I'm struggling to find anything about this in the TinyMCE documentation, or via google.
How do I stop, or control this apparent stripping of html formatting?
p.s. for new documents, everything is working fine, and storing as text/plain.
I am learning networking recently.
It is known that SMTP only allows 7-bit ASCII.
I would like to know if SMTP can send attachment such as pictures, videos or files via email. If so, how can the attachment be sent?
Thank you
With SMTP, almost every email is using MIME (Multipurpose Internet Mail Extensions, RFC2045). MIME is independent of SMTP, but can be thought like extension to it. HTTP protocol is also using MIME.
MIME contains two parts. MIME headers and MIME content. MIME headers describe what the contents will be. MIME is full of features, but I'm only describing what is relevant to your question.
MIME headers of interest:
Content-Type describe what the content is. Simply, text is just text/plain and image/jpeg is JPEG image.
Content-Transfer-Encoding describe how the content is encoded. Common encodings in email are quoted-printable and base64. These encodings are designed for SMTP's 7bit delivery in mind.
Content-Disposition header contains for example attachments file name.
For sending attachment or multiple attachments, each attachment is encoded as described above (some headers + encoded content). First Content-Type header is set to multipart/mixed and given boundary tag like this:
Content-Type: multipart/mixed; boundary=4vvtTcl0dIpecpyi12ab54
And every attachment (headers + content) starts with boundary tag:
--4vvtTcl0dIpecpyi12ab54
followed by MIME headers and then contents. This way the email client can separate attachments from each other.
I would also like to mention that there is 8BITMIME extension to SMTP for 8 bit support. See RFC6152: SMTP Service Extension for 8-bit MIME Transport.
Is it alright to send HTML-only emails without the text/plain part when doing HTML only actions like clicking a link to view replies or some other "alert" type notification? For example, clicking a link to activate your email or clicking to see new comments.
Date: Wed, 07 Mar 2012 10:30:54 -0800 (PST)
From: email#site.com
Subject: Test Mail
To: <email#site.com>
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
VGhpcyBpcyBdfJDFKdjfkdsFpbCBmcm9tIGxvY2FsaG9zdCB3aXRoIGZzbdrb3BlbigpIGF0IDEz
eGVvbmNyb3NzLmNvbSI+eGVvbmNyb3NzLmNvbTwvYT4gPGk+bGluazwvaT4hPHA+VGhpcyBpcyBt
b3JlIHRleHQ8L3A+
Instead of using multipart to create two copies of the same email.
Date: Wed, 07 Mar 2012 10:30:54 -0800 (PST)
From: email#site.com
Subject: Test Mail
To: <email#site.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="4f57a7d259baf"
--4f57a7d259baf
Content-Type: text/html; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: base64
VGhpcyBpcyBdfJDFKdjfkdsFpbCBmcm9tIGxvY2FsaG9zdCB3aXRoIGZzbdrb3BlbigpIGF0IDEz
eGVvbmNyb3NzLmNvbSI+eGVvbmNyb3NzLmNvbTwvYT4gPGk+bGluazwvaT4hPHA+VGhpcyBpcyBt
b3JlIHRleHQ8L3A+
--4f57a7d259baf
Content-Type: text/text; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: base64
VGhpcyBpcyBdfJDFKdjfkdsFpbCBmcm9tIGxvY2FsaG9zdCB3aXRoIGZzbdrb3BlbigpIGF0IDEz
MzExNDQ2NTgKCkFsc28gd2l0aCBhIGdvb2dsZS5jb20gdXJsIGFuZCB4ZW9uY3Jvc3MuY29tIGxp
bmshVGhpcyBpcyBtb3JlIHRleHQ=
I would like to save the bandwidth if there isn't a very good reason to include the text version.
If you're looking to save bandwidth, I don't think you should be using base64 encoding as it makes your data 33% larger (on average). In my understanding, text/plain (not text/text) should always be provided in a human-readable format (like quoted-printable).
I don't think there are many e-mail clients that can't read HTML nowadays, still I think your decision should reflect how important it is for the end-user to be able to read (and understand) your e-mail / alert and not (minor) bandwidth limitations. I've no experience with AOL, but I think it had some issues with e-mail links a few years ago, perhaps that counts as a bonus points for the plain text alternative.
Also, don't forget that the actual links need to be displayed in plain text versions.
I'm trying to send some html in a generated email that looks something like this:
X-Sender: XXXX#xxxx.com
X-Receiver: XXXX#xxxx.com
MIME-Version: 1.0
From: XXXXXXX#xxxx.com
To: XXXXX#xxxx.com
Date: 9 Dec 2010 10:55:52 -0800
Subject: Test email
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
<p>Click on the link below</p><p>Click Here</p>
The email sends but for some reason the link tag doesn't show up. I'm thinking it has something to do with the the content type. Any ideas? Thanks in advance.
You could try this Content-Type: "Content-Type: text/html; charset=ISO-8859-1\r\n"
It should allow your HTML to be handled properly.
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.