Questions tagged [mimebodypart]

7 questions
2
votes
0 answers

Java MimeBodyPart wrongfully showing as attachments

I am having a really weird problem when adding more than one MimeBodyPart to a MimeMultiPart. Essentially, if the MimeMultiPart is mixed, then all MimeBodyPart objects are added as attachments, except for the last one, which is added to the body. If…
Jak
  • 178
  • 10
1
vote
0 answers

MimeBodyPart.getInputStream only returns the first 8192 bytes of an email attachment

I am using MimeBodyPart.getInputStream to retrieve a file attached to an incoming email. Anytime the attached file is larger than 8192 bytes (8 KiB), the rest of the data is lost. fileInput.readAllBytes().length seems to always be min(fileSize,…
mo_st
  • 149
  • 2
  • 12
1
vote
0 answers

Cloning javax.mail.Message and Cloning javax.mail.Multipart, Java 8

I'm implementing a mail Sender, near 1'6000.000 mails (with images and PDF) in one day per month (closing month extract), the mails are about 12 products... I need to fill a Message Scratch per product... in order to not read (per email) else per…
joseluisbz
  • 1,491
  • 1
  • 36
  • 58
1
vote
0 answers

Java Encoding Base64, MimeBodyPart Attachment

I have a PDF Files Encoded with Base64, now I want to send the PDF's and allow to open from mail. I was reading this question, But IS not working for me https://stackoverflow.com/a/9124625/811293 Message message = new MimeMessage(session); …
joseluisbz
  • 1,491
  • 1
  • 36
  • 58
0
votes
0 answers

Reading input stream byte array from mime body part takes too long with java mail api

Reading input stream byte array from mime body part takes 11 minutes for 25MB file. When viewing single email, I am reading input stream byte array from MimeBodyPart, but it takes 11 minutes to read 25MB file with java mail API. How can I speed up…
0
votes
1 answer

javamail MimeBodyPart.SetFileName() makes image weird java

I'm trying to attach images using javamail to a mail but it calls it "noname" by default, so I used .setFileName("name") but it results in the image being weirdly displayed on a black background instead of a transparent one, and the whole image get…
0
votes
0 answers

How to use Java to read .mgs attachment using bodyPart.isMimeType("message/rfc822")

I'm not very expert on Java. I updated some functions in an existing Java web application. My application reads .eml file and save on local server the attachments. Now I have two problem when the attachment is a msg: The file name is null I don't…
Marco Ferrara
  • 516
  • 1
  • 8
  • 26