title: Body content is not being sent while I am trying to send an email with attachment with main body content in Java methods of MimeMessage
body: <pre><code>Message message = new MimeMessage(session);
  message.setFrom(new InternetAddress(fromEmail));
  message.setRecipient(Message.RecipientType.TO, new InternetAddress(toEmail));
  message.setFileName("abc.xls");
  message.setText("Fill the content:");
  </code></pre>
  
  <p>Above is  the main part of code which I am using. While I use the above code, i don't see main body content "Fill the content" in the sent mail. There are other posts and comments which have piece of code which works that's this problem cab be resolved by using MimeMultipart &amp; MimeBodyPart class. But no where it's explained the reason of why the above code is not working.</p>
  
  <p>I am also aware that using setFileName is not enough to add the content present inside the file, it's just used to add the attachment without content.</p>
  
  <p>Note: I am using javax.mail-1.5.0.jar</p>
  
  <p>Can you please explain the reason of the above code not working?</p>
  
  <p>Thanks in advance.  </p>