Announcement

Collapse
No announcement yet.

Is there a way to catch "Fatal error: Uncaught exception 'Swift_TransportException' "

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a way to catch "Fatal error: Uncaught exception 'Swift_TransportException' "

    My email service stops accepting email several times a day which causes this error "Fatal error: Uncaught exception 'Swift_TransportException' with message ...".
    Is their a way I can catch it inside the code and handle it?
    Ed

  • #2
    Originally posted by emilner View Post
    My email service stops accepting email several times a day which causes this error "Fatal error: Uncaught exception 'Swift_TransportException' with message ...".
    Is their a way I can catch it inside the code and handle it?
    Ed
    I tried it once to catch the issue with 'try... catch' around the mail instruction, but somehow this is not triggered on an email issue. So if there's a way, I don't know it. I guess the error is on a too low level.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Originally posted by aducom View Post
      I tried it once to catch the issue with 'try... catch' around the mail instruction, but somehow this is not triggered on an email issue. So if there's a way, I don't know it. I guess the error is on a too low level.
      Hi, I'm having the same problem. The error is simple, the password that the user gives is not correct so connection to mail server is failed.
      I need some validation, if email and password are correct, then proceed to sc_mail_send, if not, just display some error message.
      Can it be done?

      Thank you

      Comment


      • #4
        yes it can be done, but then you need to login to the smtp server and log out again.
        I suggets using phpmailer (which is better then the scriptcase mailer anyway).
        You can custom code it but the smtp user/password are coming from the php.ini file and thus it is not favorable to use.
        A basic example is quickly found: http://phpmailer.worxware.com/?pg=examplebsmtp and http://stackoverflow.com/questions/1...-configuration

        Comment

        Working...
        X