why mail content is sent as attachment when I send it to Hotmail account?
<p>why mail content is sent as attachment when I send it to Hotmail account?</p>

<p>When I send mail to a Hotmail account the body of the mail is sent as attachment. But when sent to other accounts like yahoomail, gmail it is not creating any problem.</p>

<p>I want to know why I am getting problem with Hotmail accounts.</p>

<p>Please give me a solution for this.</p>

<p>MimeMessage msg = createMimeMessage(sender, emsg,session,mail.companyName); Transport.send(msg); </p>

<p>Multipart multipart = new MimeMultipart();</p>

<p>// This is the template Attachment part</p>

<p>if (emsg.getAttachment() != null) {</p>

<p>for (File file : emsg.getAttachment()) {</p>

<p>MimeBodyPart messageAttachmentBodyPart = new MimeBodyPart();
messageAttachmentBodyPart = new MimeBodyPart();</p>

<p>DataSource source = new FileDataSource(file);</p>

<p>messageAttachmentBodyPart.setDataHandler(new DataHandler(source));
     messageAttachmentBodyPart.setFileName(file.getName());
multipart.addBodyPart(messageAttachmentBodyPart);
    }
   }</p>
