문제

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