Jump to:

23493 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Email Exception Handling ?

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

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

Page: 1
Go to End
Author Topic: 922 Views
  • YourMan
    Community Member
    5 Posts

    Email Exception Handling ? Link to this post

    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

  • Willr
    Forum Moderator
    5508 Posts

    Re: Email Exception Handling ? Link to this post

    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.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.