zone-eu / zone-mta

📤 Modern outbound MTA cross platform and extendable server application
European Union Public License 1.2
583 stars 93 forks source link

How to save message to sent folder? #408

Open xdkaka opened 1 week ago

xdkaka commented 1 week ago

I want to develop a plugin that sends emails using the SMTP protocol and, upon successful sending, saves the email to the sent mailbox via the IMAP protocol. If sending fails, the email should be saved to the drafts folder using the IMAP protocol.

However, I haven't found a way to read the raw text of the email. Thank you.

louis-lau commented 14 hours ago

You could use the wildduck plugin as an example for this I think:

https://github.com/nodemailer/zonemta-wildduck/blob/fdc6f5355dd41b2d490440e404ff52dda99fac2c/index.js#L753-L825