adonisjs / mail

AdonisJS Email Provider
MIT License
106 stars 34 forks source link

Add possibility to get status of mail #83

Closed jonasrichardrichter closed 1 year ago

jonasrichardrichter commented 1 year ago

Why this feature is required (specific use-cases will be appreciated)?

To keep a log of important mails its important to know that the mail was accepted by the mailer (like SMTP). Callback function in case of success or failure would be appreciated.

Have you tried any other work arounds?

try/catch surrounding Mail.sendLater does not work as intended

Are you willing to work on it with little guidance?

Surely

thetutlage commented 1 year ago

The Mail.sendLater method moves the email to a memory queue. You can monitor the queue to know if the mail was accepted by the server or not.

https://docs.adonisjs.com/guides/mailer#monitory-mailer-queue