I'm trying to send an email with an attachment that will be an email in format .eml using Mailjet Send API with java (Java 8).
I have the email I want to attach in raw format (obtained using the Gmail API) and I try to add it to the main email as the Mailjet documentation says, but when I try to open the email attached, I get the following error:
I tried to open the email with the Thunderbird client too, and it shows me strange content, as if the .eml file were corrupted.
I think that I'm adding the attachment correctly to the email that will be sent, following the format indicated in the documentation. The variable raw is the string that has the email I want to send as an .EML file.
I don't know if the problem is related to the way Mailjet creates the eml attachment, or because how Gmail API give me the raw email.