KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My goal: Send transactional emails via SMTP with plain/text, text/html, and attachments. My code: Implemented with JavaMail My issue: It looks fine on hotmail, or outlook. But on gmail , it does not show the message body properly if it is an email with a .txt attachment (it works alright if attachments are images) Any help would be highly appreciated. Here is my raw SMTP output: Subject: ALTERNATIVE | TXT | HTML |ATT.ATTACHMENT | Thu Jun 13 17:48:04 EDT 2013 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_0_21791733.1371160084561" ------=_Part_0_21791733.1371160084561 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Body message in text format! ------=_Part_0_21791733.1371160084561 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Body message in <b>html</b> format! Sent on Thu Jun 13 17:48:04 EDT 2013<br> to: me@gmail.com<br> to: me@mijo.com<br> cc: me@hotmail.com<br> cc: rafael.santos.test@hotmail.com ------=_Part_0_21791733.1371160084561 Content-Type: text/plain; charset=us-ascii; name=email_attachment.txt Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=email_attachment.txt This is a text attachment file! ------=_Part_0_21791733.1371160084561-- . 250 Delivery in progress QUIT Some screenshots Sent with only one .txt attachment. The message body does not display and attachment are duplicated. Same message but with different attachment (.gif). Everything looks fine. === SOLUTION FOR JAVA DEVELOPERS ==== The overall idea is described here: <a href="
Tags (comma-separated)
Save Edits
Cancel