Re: SMTP mail, need way of making sure mail is sent

From: Brad (nospam_at_co.lane.or.us)
Date: 05/19/04


Date: Wed, 19 May 2004 08:12:12 -0700

If your smtp mail server is on another server consider setting up smtp
virutal server on the same box as your web server (on your pc when
developing). Set the smtp virutal server to relay to the actual smtp mail
server (in win2003 virtual smtp this setting is the "smart host"). What
this will do for you is pretty much guarantee that your mail will always get
queued....as long as your web server is up and the smtp service on it is
running. The beneifit of this is that if the mail server is down or there
is a network disconnect the email will still queue locally until the mail
server is available again.

If you have the benefit of multiple mail servers you can set up your code to
round robin attempt to the different mail servers. For example, if you
attempt to send to mail server 1 and a try/catch error is raised then
attempt to send to server 2 and if server 2 is down...etc. I prefer to
attempt the local smtp server first as the general logic is that if it's
down the web site is *probably* down too. We've found, through heavy
testing, that we can actually loose some emails (they just disappear) if we
send directly to our mail server and either the email viruswall server
and/or the attempted smtp mail server is down...in some situations no error
is raised when this happens: something that took me days to prove out to
our networking staff. Yet in the same situation, if the email is queued
locally it stays queued until the mail server is up.

Don't know if that answers your question but hope it helps.

Brad

"Charlie@CBFC" <charle1@comcast.net> wrote in message
news:ujughVZPEHA.2996@TK2MSFTNGP12.phx.gbl...
> Hi:
>
> I'm working on an e-commerce site. Using the SMTP class, my site sends
out
> confirmation messages. It works most of the time, but sometimes raises an
> error. I need a way of making sure it goes out every time. I thought
about
> wrapping a try-catch handler in loop that keeps on retrying if delivery
> fails. Is this a good idea? If not, what is the best way of handling
this
> kind of thing?
>
> Thanks,
> Charlie
>
>



Relevant Pages

  • Re: javamail send error
    ... I am using javamail 1.4 API to send messages through a SMTP server. ... How is authentication configured on your mail server? ... Some mail servers will offer AUTH on the normal SMTP port of 25 and some will ...
    (comp.lang.java.programmer)
  • Re: SMTP problems
    ... SMTP server, the problem may be due to: ... >> not connected using 'ana2writing.org' as your ISP. ... TCP/IP port 25 except to their own SMTP mail server.) ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • RE: SMTP
    ... which is a mail server at the ISP. ... Exchange System Manager. ... To get to the SmallBusiness SMTP connector in the Exchange System Manager, ...
    (microsoft.public.windows.server.sbs)
  • Re: Port 25, 80 & 8080 Blocked / How to Work-around?
    ... >web server and SMTP mail? ... >to get around this - using a cable modem and linksys router for the ISP ... >connection on a W2k-IIS server? ... could not use that provider's smtp server to relay your traffic. ...
    (comp.security.firewalls)
  • Re: SMTP Relay....Driving me crazy....
    ... The confusing part is the 'free little mail server' and why you would run ... I can receive by SMTP) but I must relay out through the ISP's ...
    (microsoft.public.windows.server.sbs)