Send result
kereal opened this issue · comments
Hi, I'm using carbon with smtp adapter.
How can I get the result of sending a message?
Method "deliver" return useless "{"221", ["2.0.0 Closing connecton"]}"
Email client returns true or false
https://github.com/arcage/crystal-email/blob/2f6ee366e6fd2ea24ed1df484eaab39e19ffdc0b/src/email/client.cr#L186
Maybe it's worth returning this result from the adapter and this method?
Line 133 in d7d9b30
You can use the after_send
method
Line 138 in d6808a2
https://luckyframework.org/guides/emails/sending-emails-with-carbon#before-after-send-callbacks
Ok, I can get response, but it's not true or false from EMail::Client
For example, i got
ERROR - e_mail.client: [EMail_Client] <-- AUTH 535 Authentication failed.
with response "{"221", ["Bye"]}"
The letter was not sent and I can't find out about it inside my mailer ApplicationMailer < Carbon::Email