How can I export a complete email sent by discourse to a file (eml or msg format)?
Background of the question: We are having problems, that discourse invite emails are classified as spam by the receiving email server (of one email provider – for other email providers it works). To debug the issue, the email provider requested samples of the sent email as eml or msg files.
If you can retrieve an invite email in your spam folder, or another inbox in which the email wasn’t detected as spam, pretty much any email client has the option to download the message in one of these formats.
For example, in Gmail, it would be here to download the email in a .eml format:
I’m aware of that, and did provide a sample that went through at another provider to the provider in question. But that support explicitly asked for a sample sent to them. :-/ I’m not in the position to discuss with them about the sense of that, but just want to fulfil their request…
@pfaffman can you elaborate a little, not sure if I get you right.
We use the “standard” installation with two docker containers (discourse, mail-in) and send via an SMTP connection using an email address of the provider in question to other email addresses of the provider in question. As the provider in question asks me for samples, the apparently cannot (or will not) find a sample on their system. Thus I’m looking for a way to export it from discourse. I can see the mail in the admin panel as “undeliverable”, but only see the incoming bounce message, not the email sent. Under “sent” I do see a row with the email, also showing the smtp details: 250 2.0.0 OK queued with id Z2869bz5GCbjCq9 but not the email details (header, body) or way to download/export it.
Yes. A simmilar setting to the already existing setting delete email logs after days would probably be sensible to prevent overflowing the disk by deleting the emails itself after n days as well.
While beyond my current competences, first approach seems doable to me as a workaround (with added work). For the second suggestion I would fear, that support would reject the email as the receiving mail server may have altered the email… :-/
We are not “having”, just “using” the smtp server. It’s a mail server of an external provider (actually the same provider, who is declining the mails…). The mail server is indeed delivering the mail, only the receiving mail server (of the same provider) is declining the mail.
As it is the mail server of an external provider, we do not have access to the log files.
But I’m continuing back and forth with the support of them, hoping to come to a solution sometime soonish (it only took close to a month by now…).
The story continus… Now the support wants a copy of the bounce mail as eml or msg file. Thus my follow-up question: Is it possible to export an incoming email? Under E-Mail → Bounced I do see a list entry and can have a look at the email details (header fields, subject, mail body, …) but I do not see a possibility to download the message as a file. Am I overseeing anything, is there a different way?
Thanks for the info. I wasn’t sure about encoding and stuff (e.g. example of a mail source code out of my MTA: ...m=C3=BCssten wir auch noch mal 2 gro=C3=9Fe Switche...), if it would work the same.