Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Email Exception Handling ?


Go to End


2 Posts   1658 Views

Avatar
YourMan

Community Member, 5 Posts

21 May 2011 at 7:14am

I have found a problem, that if the SMTP servers I'm using become unavailable or timeout.
It sends the form that I send an email with into a loop, where it keeps returning to form page on submit.

My question is how the email class handles something like no answer from the SMTP server?
Could really use some hlep with this please

Avatar
Willr

Forum Moderator, 5523 Posts

21 May 2011 at 10:43am

From what I remember is no exceptions will be throw (SS doesn't really use exceptions that much currently), $email->send() will return a boolean based on whether the mail command worked, so you could check to see if that email is returned false (may return true even though it fails later on), Haven't tried it myself.