|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.appHtmlEmail generated email don't display in Macos X Mail.app
----------------------------------------------------------- Key: EMAIL-69 URL: https://issues.apache.org/jira/browse/EMAIL-69 Project: Commons Email Issue Type: Bug Affects Versions: 1.1 Environment: Macos X 10.4 with Mail.app Reporter: Numa Schmeder Hi, The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. For example this email will only display the text part and not the html part on Mail.app: HtmlEmail htmlEmail = new HtmlEmail(); htmlEmail.setHtmlMsg(htmlMessage); htmlEmail.setTextMsg(textMessage); email.setFrom(from,fromName); email.addTo(to, toName); email.setSubject(subject); email.send(); But this email will disply correctly the html in Mail.app: HtmlEmail htmlEmail = new HtmlEmail(); htmlEmail.setHtmlMsg(htmlMessage); email.setFrom(from,fromName); email.addTo(to, toName); email.setSubject(subject); email.send(); The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_0_11727281.1194085710604" ------=_Part_0_11727281.1194085710604 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ch=C3=A8re Mme Dupont ,=20 Text Blah blah ------=_Part_0_11727281.1194085710604 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= w3.org/TR/html4/loose.dtd"> <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> <head> <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= =20 =09 <title>My Email</title> </head> <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > <b>Ch=C3=A8re Mme Dupont ,=20</b> <br/> Blah Blah html content </body> </html> ------=_Part_0_11727281.1194085710604-- This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. I hop there is a quick fix for this. Thank you for your help. Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539928 ] Numa Schmeder commented on EMAIL-69: ------------------------------------ Hello, Actually I have tested the same operation with commons-email 1.0. The content type is correctly set to "Content-Type: multipart/alternative;" It works perfectly, the mail displays correctly the html part on Mail.app. So this issue is new and has been introduced in version 1.1. I am going to see in the sources if I can find the problem. Numa > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543845 ] Tobias Bocanegra commented on EMAIL-69: --------------------------------------- i guess the problem was introduced in issue [EMAIL-50]. suggest to use the "alternative" container not only if there are embedded images but also if both a html and text message are set, eg: boolean useAlternative = this.inlineEmbeds.size() > 0 || (EmailUtils.isNotEmpty(this.html) && EmailUtils.isNotEmpty(this.text)); and then later: msgText = new MimeBodyPart(); if (useAlternative) { subContainer.addBodyPart(msgText); } else { container.addBodyPart(msgText); } > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544120 ] Ben Speakmon commented on EMAIL-69: ----------------------------------- I'm on vacation this week, so I can't get to this before the beginning of December. Could someone supply a patch and unit test? That would make it go quite a bit faster. > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544133 ] Bjorn Townsend commented on EMAIL-69: ------------------------------------- I'll see what I can do. Hope vacation's going well. :) > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Updated: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bjorn Townsend updated EMAIL-69: -------------------------------- Attachment: EMAIL-69-fix.patch EMAIL-69-test.patch Unit test and potential fix for this issue. > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > Attachments: EMAIL-69-fix.patch, EMAIL-69-test.patch > > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568431#action_12568431 ] Chris Beaumont commented on EMAIL-69: ------------------------------------- Sadly, patch is incomplete: now it is broken when you have an embed'ded image ... email.setHostName("smtp-server...."); email.addTo("chris@...", "John Doe"); email.setFrom("me@...", "Me"); email.setSubject("Test email with inline image"); URL url = new URL("http://www.apache.org/images/asf_logo_wide.gif"); String cid = email.embed(url, "Apache logo"); email.setHtmlMsg("<html>TESTING<br>TESTING<br>The apache logo - <img src=\"cid:" + cid + "\"></html>"); email.setTextMsg("Your email client does not support HTML messages"); email.send(); This will display the Apache logo all by itself (since we have a multipart/alternative FIRST). Assignment of boolean in the patch should read: boolean useAlternative = (EmailUtils.isNotEmpty(this.html) && EmailUtils.isNotEmpty(this.text) && (this.inlineEmbeds.size() == 0) // This was lost from Tobias's post ); [i.e., use alternative when we have text AND html but NO embed (if embed, then it is covered by the sub-container) ] > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > Attachments: EMAIL-69-fix.patch, EMAIL-69-test.patch > > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568820#action_12568820 ] Ben Speakmon commented on EMAIL-69: ----------------------------------- Bjorn, can you throw a fix in for this? > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > Attachments: EMAIL-69-fix.patch, EMAIL-69-test.patch > > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571440#action_12571440 ] Jeroen Ticheler commented on EMAIL-69: -------------------------------------- Hi, I face the same problem. I found a description of the potential problem that may be of interest to you here: http://mtrr.org/blog/?p=88 Looking forward to a fix :-) Greetings, Jeroen > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > Attachments: EMAIL-69-fix.patch, EMAIL-69-test.patch > > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585366#action_12585366 ] Phillip commented on EMAIL-69: ------------------------------ Hi, Not sure if it is related to the issue raised here or not. I've found that not all html based emails created with this commons module display inline in the thunderbird mail client. From taking a quick look at the message source this is presumably because the content disposition field is left out so the mail client makes a best guess, in the cases where thunderbird decides to display the html as an attachment to the email microsoft outlook goes ahead and displays the html inline. From what I can gather calls to HTMLEmail.setHtmlMsg need to result in the generated email including Content-Disposition: inline for that part of the email. If this issue should be raised as a separate issue just say so, and if greater is required let me know. Cheers Phillip > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > Attachments: EMAIL-69-fix.patch, EMAIL-69-test.patch > > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Updated: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adhamh Findlay updated EMAIL-69: -------------------------------- Attachment: mail.app.patch Attaching a patch that fixes this issue. Its just the original patch plus the required changes. > HtmlEmail generated email don't display in Macos X Mail.app > ----------------------------------------------------------- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug > Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app > Reporter: Numa Schmeder > Attachments: EMAIL-69-fix.patch, EMAIL-69-test.patch, mail.app.patch > > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app doesn't recognize and display the html part when you send a mail with a Html and Text part as alternative. > For example this email will only display the text part and not the html part on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="----=_Part_0_11727281.1194085710604" > ------=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > ------=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.= > w3.org/TR/html4/loose.dtd"> > <html version=3D"-//W3C//DTD HTML 4.01 Transitional//EN"> > <head> > <meta name=3D"generator" content=3D"Le-Voyage.com mail generator 1.0"/> > <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />= > =20 > =09 <title>My Email</title> > </head> > <body leftmargin=3D"0" topmargin=3D"0" marginwidth=3D"0" marginheight=3D"0"= > > > <b>Ch=C3=A8re Mme Dupont ,=20</b> > <br/> > Blah Blah html content > </body> > </html> > ------=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? In all other html email I have checked the mime layout uses multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
| Free Forum Powered by Nabble | Forum Help |