You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the workflow I'm attempting to achieve using Simple Java Mail:
Save Outlook MSG
Convert Outlook MSG to EML string
Save EML String to .eml file
Re-open .eml file in Outlook
See the same file
Everything works except for embedded images do not parse correctly because of the "Content-ID" not being set correctly. I believe.
The issue manifests as such:
Given this email in Outlook with an embedded image:
I then run it through this line of code: String emlStr = EmailConverter.outlookMsgToEML(file);
I then save out the "emlStr" to a file and open it in Outlook to see this:
Basically, the file is now attached and not embedded. And it can't be found because of a filename change.
The reason I think the problem lies in the "Content-ID" is because of this in the EML file script, I see this:
The HTML email is there with the <img> tag and src="cid:image001.png@01D719B4.37AF4500"
However, notice the line Content-ID: <image001.png@01D719B4>
It's missing the last part of the src name from the img tag. In looking at your source, this seems to happen here in your source.
Why do you strip the file's extension type off the resource name for Content ID?
What are your thoughts? Am I doing something wrong in using your library?
This is one of my first times doing this, if I should submit this in a different format, please let me know.
The text was updated successfully, but these errors were encountered:
This behaviour stems from the attachment detection algorithm, which deals with extensions in a certain way. Obviously this is a bug you found, so thank you for bringing it up!
Hello,
This is the workflow I'm attempting to achieve using Simple Java Mail:
Everything works except for embedded images do not parse correctly because of the "Content-ID" not being set correctly. I believe.
The issue manifests as such:
Given this email in Outlook with an embedded image:
I then run it through this line of code:
String emlStr = EmailConverter.outlookMsgToEML(file);
I then save out the "emlStr" to a file and open it in Outlook to see this:
Basically, the file is now attached and not embedded. And it can't be found because of a filename change.
The reason I think the problem lies in the "Content-ID" is because of this in the EML file script, I see this:
The HTML email is there with the
<img>
tag andsrc="cid:image001.png@01D719B4.37AF4500"
However, notice the line
Content-ID: <image001.png@01D719B4>
It's missing the last part of the src name from the img tag. In looking at your source, this seems to happen here in your source.
Why do you strip the file's extension type off the resource name for Content ID?
What are your thoughts? Am I doing something wrong in using your library?
This is one of my first times doing this, if I should submit this in a different format, please let me know.
The text was updated successfully, but these errors were encountered: