سؤال

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