What is Content-Transfer-Encoding: quoted-printable?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alson_Lim
Posted On:   Thursday, November 18, 2004 12:57 AM

I have a web application that sends out SMTP email using Java mail api. Some of the recipients receive the email with "Content-Transfer-Encoding: quoted-printable" appearing at the start of the mail body, while some get the line as "Content-Transfer-Encoding: 7bit". Questions: 1. What do these lines mean? Why do they appear in the email? When I test out the same program from my development server, I don't get these line. But they appear when the emails are sent from my production server. 2. When the email is having "Content-Transfer-Encoding: quoted-printable", then the email messages do not terminate properly. That's every line ends with "=20" characters? Why is    More>>


I have a web application that sends out SMTP email using Java mail api. Some of the recipients receive the email with "Content-Transfer-Encoding: quoted-printable" appearing at the start of the mail body, while some get the line as "Content-Transfer-Encoding: 7bit".


Questions:


1. What do these lines mean? Why do they appear in the email? When I test out the same program from my development server, I don't get these line. But they appear when the emails are sent from my production server.


2. When the email is having "Content-Transfer-Encoding: quoted-printable", then the email messages do not terminate properly. That's every line ends with "=20" characters? Why is it happening like this?


I am new to Java Mail. Appreciate if someone could advise what's wrong here.


Thanks
Alson

   <<Less

Re: What is Content-Transfer-Encoding: quoted-printable?

Posted By:   Christopher_Koenigsberg  
Posted On:   Sunday, November 21, 2004 06:52 AM

Read the RFC's. www.ima.org is a good site to look up mail-related RFC's.


Basically, Internet email was designed when only 7-bit ascii was completely "safe" from being damaged in transit, because transfer agents under basic SMTP (unlike ESMTP with certain extensions) are completely free to chop off the high-order 8th bit of characters they handle in transit.


So, as you have noticed, "quoted-printable" is a way of encoding 8-bit characters in 7-bit ascii, where for instance, the sigle linefeed character is encoded as "=20". Quoted-printable is intended for use when a message is nearly all 7-bit ascii except for a few extended (8bit) chars here and there.


For encoding lots of arbitrary characters and other data in message content, use "base64".
About | Sitemap | Contact