Home  >  Forum  >  Core Java
Post New Query

javax.mail.MessagingException: No MimeMessage content


joined on
March 27,2014
Asked on February 26,2015
New to Java Email, trying with Gmail and getting exception as below. How to resolve it.

javax.mail.MessagingException: No MimeMessage content
at javax.mail.internet.MimeMessage.getContentStream(MimeMessage.java:1334)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1473)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1773)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1119)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)

joined on
November 18,2013
Replied on February 26,2015

You are missing to add line

MimeMessage.setContent(multipart);

Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us