[play-1.24][gae-1.6.0] Error converting html body when sending email

229 views
Skip to first unread message

Ronald Haring

unread,
Mar 6, 2012, 4:06:44 PM3/6/12
to play-fr...@googlegroups.com
Hello all,

recently I am trying to use play with gae and after some minor hickups it seems to be working now, all but sending out html emails. The following error occurs when sending out emails with html templates:

DEBUG: loading new provider protocol=gm, className=com.google.appengine.api.mail.stdimpl.GMTransport, vendor=null, version=null
Loading javamail.default.providers from jar:file:/home/ronald/java/play-1.2.4/framework/lib/mail-1.4.3.jar!/META-INF/javamail.default.providers
DEBUG: loading new provider protocol=imap, className=com.sun.mail.imap.IMAPStore, vendor=Sun Microsystems, Inc, version=null
DEBUG: loading new provider protocol=imaps, className=com.sun.mail.imap.IMAPSSLStore, vendor=Sun Microsystems, Inc, version=null
DEBUG: loading new provider protocol=smtp, className=com.sun.mail.smtp.SMTPTransport, vendor=Sun Microsystems, Inc, version=null
DEBUG: loading new provider protocol=smtps, className=com.sun.mail.smtp.SMTPSSLTransport, vendor=Sun Microsystems, Inc, version=null
DEBUG: loading new provider protocol=pop3, className=com.sun.mail.pop3.POP3Store, vendor=Sun Microsystems, Inc, version=null
DEBUG: loading new provider protocol=pop3s, className=com.sun.mail.pop3.POP3SSLStore, vendor=Sun Microsystems, Inc, version=null
DEBUG: getProvider() returning provider protocol=gm; type=javax.mail.Provider$Type@81f451; class=com.google.appengine.api.mail.stdimpl.GMTransport
Exception in thread "DataHandler.getInputStream" java.lang.ClassCastException: javax.mail.internet.MimeMultipart cannot be cast to java.lang.String
    at org.apache.geronimo.mail.handlers.TextHandler.writeTo(TextHandler.java:143)
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:869)
    at javax.activation.DataHandler$1.run(DataHandler.java:251)
    at java.lang.Thread.run(Thread.java:662)

I have the appropiate google sessions but even without them the same error occurs. Txt email is no problem, its just that for some reason, the parsed content of the html even as simple as html tag with body tag with only text Hello you will throw the error.

Any pointers will be appreciated

Regards
Ronald

Pascal Voitot Dev

unread,
Mar 6, 2012, 5:46:36 PM3/6/12
to play-fr...@googlegroups.com
Could you see if you get the same kind of problem than this issue : https://github.com/guillaumebort/play-gae/issues/14 (in the attached lighthouse issue, there is the same bug as yours).
I thought it was closed but maybe not...

Could you also test with play1.2.3 to see if you have the same pb?

Thanks
Pascal



Ronald

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/jFbymgwoSToJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Ronald Haring

unread,
Mar 7, 2012, 3:10:19 AM3/7/12
to play-fr...@googlegroups.com
Yes its the same bug, the stacktrace in my previous mail was the stacktrace when smtp.debug is on. The rest of the stacktrace is the same as the bug mentioned. I will try it with 1.2.3 as well

Thx so far
Ronald


Reply all
Reply to author
Forward
0 new messages