When sending mail through actionmailer, the actionmailer gets a response from the SMTP server, when its ok, or when its wrong. Is there a way to retrieve this response after
Set return_response: true
in the smtp settings and call message.deliver!
instead of deliver
. This returns the SMTP server response, a Net::SMTP::Response
, which contains the server response you're looking for.
If you need a log of all responses from the connection with the server, not just the final result, you'll need to dig into Net::SMTP.