Closed SAGV closed 6 years ago
Hi SendGrid doesn't offer any API which accepts the MIME formatted emails, that's why implementing a driver will be converting the underlying packet of Adonis mail to Sendgrid API fields.
This is 100% achievable, but more work for me to make sure.
The mail driver is extendible, which means you can add your own drivers, within your app.
class SendGrid {
setConfig (config) {
}
send (message) {
// make sure to return promise
}
}
ioc.extend('Adonis/Addons/Mail', 'sendgrid', function () {
return new SendGrid()
})
Indeed, no problem then.
Just in case if someone else needs it, here is a fork of deprecated implementation (#1 ): https://github.com/SAGV/adonis-mail/tree/feature/sendgrid-support-v4 which is adjusted for the latest adonis-mail version.
However, I didn't write tests so use on your own risk. Maybe one day I'll make a proper plugin out of it ;-)
👍
I'm very impressed with the framework and would like to thank @thetutlage and the others for the great job!
However, there is still a small detail missing — SendGrid driver for the mail so I think it deserves a separate issue.
P. S. See PR with the deprecated implementation https://github.com/adonisjs/adonis-mail/pull/1