Home  >  Forum  >  Core Java
Post New Query

javax.mail.MessagingException: No MimeMessage content



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)




Replied on February 26, 2015
You are missing to add line

MimeMessage.setContent(multipart);


Write Answer




©2019 concretepage.com | Privacy Policy | Contact Us