Closed simonedelmann closed 4 years ago
I did manage to close the connection in my command like this:
Mail.connection()._driverInstance.transporter.close()
Maybe you can add a shorthand for this? :)
Hey @simonedelmann! 👋
Feel free to create a PR that add Mail.close()
. 👍
I send mails from an ace command via SMTP. The ace command doesn't close (which is bad because it's intended to run via cron) because this package opens a SMTP connection but never closes it. We need either a Mail.close() command (similar to this) or the connection should be closed by default. I could fix the issue by adding
this.transporter.close()
withinsrc/Mail/Drivers/Smtp.js
, but I think there should be a better solution for this.Package version
3.0.9
Node.js and npm version
Node 12.2.0 npm 6.9.0
Sample Code (to reproduce the issue)
Just create a fresh package + an ace command, send any mail via smtp from there.