i've been using ruby pony gem to send emails https://github.com/benprew/pony#readme

unfortunately documentation is not as big as i wish, just shows few methods to send email, but seems that doesnt return any message when the mail cannot be sent.

does anyone have this trouble ? so i wish to know if pony was not able to send email to tell the user that couldnt happen.

should i try with exceptions ? i'm new in ruby so i have tiny knowledge to make a decition.

Kind regards.

有帮助吗?

解决方案

Pony can throw exceptions from the Net::SMTP or Mail gems on failure, so you can catch that exception and show the user the error message. See posts like this on the Google Group, though details are a bit scarce.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top