Results 1 to 2 of 2

Thread: smtp mail problem

  1. #1

    Thread Starter
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092

    smtp mail problem

    I don't have a problem sending mail, but it's just that if the mail server is down you get an Error page as a connection to the server was not available.

    How can i catch this and redirect to an error page of my own, to stop the application halting?

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Use error trapping:

    C#:
    Code:
    try
    {
     // Send the mail here.
    }
    catch
    {
      // Catch the error if there is one.
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width