luckyframework / carbon

Email library for Crystal. Testable, adapter-based, and catches bugs for you. Comes with an adapter for SendGrid.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Send result

kereal opened this issue · comments

commented

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?

def deliver

commented

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