Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29772

Forwarding an email(having attachments and inline images) as it is using Apache common mail API

$
0
0
// Mail is getting forwarded as an attachmentMultiPartEmail email = new MultiPartEmail();MimeMultipart mp = new MimeMultipart();MimeBodyPart fmbp = new MimeBodyPart();fmbp.setContent(message, "message/rfc822");fmbp.setDisposition(Part.INLINE);mp.addBodyPart(fmbp);email.setContent(mp);

message forwarded as email attachment as screenshot

// same with this code (message forwarded as attachment in outlook client)email.setContent(message, "message/rfc822");// If I forward email to Gmail client it works fine.

If I use this below code mail is forwarded with encoded data as shown in image screenshot of forwarded email

MimeMultipart mp = (MimeMultipart) message.getContent();email.setContent(message., "message/rfc822");

I want to forward the message as it is, not as an attachment. What should I do to get this done?


Viewing all articles
Browse latest Browse all 29772

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>