E
eunever32
Hopefully this clarifies my earlier post.
I have little knowledge of Javamail but I need to read an attachment
from an email
I have the result of a decrypted email stored in a file as below
I can do:
MimeMessage msg = new MimeMessage(session, new
FileInputStream("file.txt"));
The resulting message has three headers which seems correct
msg.getContent() is not an instanceof Multipart
Is there some way to obtain the attachment??
This is a multipart message in MIME format.
--=_mixed 00561CF28025770E_=
Content-Type: multipart/alternative; boundary="=_alternative
00561CF28025770E_="
--=_alternative 00561CF28025770E_=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: base64
--=_alternative 00561CF28025770E_=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: base64
DQo=
--=_alternative 00561CF28025770E_=--
--=_mixed 00561CF28025770E_=
Content-Type: text/plain; name="TEST.txt"
Content-Disposition: attachment; filename="TEST.txt"
Content-Transfer-Encoding: quoted-printable
Some text
Some more text
And some more
--=_mixed 00561CF28025770E_=--
I have little knowledge of Javamail but I need to read an attachment
from an email
I have the result of a decrypted email stored in a file as below
I can do:
MimeMessage msg = new MimeMessage(session, new
FileInputStream("file.txt"));
The resulting message has three headers which seems correct
msg.getContent() is not an instanceof Multipart
Is there some way to obtain the attachment??
This is a multipart message in MIME format.
--=_mixed 00561CF28025770E_=
Content-Type: multipart/alternative; boundary="=_alternative
00561CF28025770E_="
--=_alternative 00561CF28025770E_=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: base64
--=_alternative 00561CF28025770E_=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: base64
DQo=
--=_alternative 00561CF28025770E_=--
--=_mixed 00561CF28025770E_=
Content-Type: text/plain; name="TEST.txt"
Content-Disposition: attachment; filename="TEST.txt"
Content-Transfer-Encoding: quoted-printable
Some text
Some more text
And some more
--=_mixed 00561CF28025770E_=--