Email Problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: bondo (mbond_at_astrum.com.au)
Date: 07/23/04


Date: 22 Jul 2004 21:31:26 -0700

I have an unusual error occurring when sending email from an ASP.NET
page. Basically, the first attempt at sending an email fails, whilst
subsequent attempts succeed without any issues. The code looks like
this:

MailMessage msg = new MailMessage();
msg.From = "testdotnet@myaddress.com";
msg.To = "bondo@myaddress.com";
msg.Body = "Testing Mail";
msg.BodyFormat = MailFormat.Text;
msg.Subject = "Testing Mail";
SmtpMail.SmtpServer = ConfigurationSettings.AppSettings["MailServer"];
SmtpMail.Send(msg);

The error messages i get by iterating through the inner exceptions of
the thrown exception are:

1st ex - Could not access 'CDO.Message' object
2nd ex - Exception has been thrown by the target of an invocation
3rd ex - The transport failed to connect to the server

I also tried using the Indy.Sockets.IndySMTP from
http://www.atozed.com/indy/ to see if this fixed the problem, but
nope, same issues.

The web server is a win2003 server. The SmtpServer variable is stored
in web.config, and is the IP address of our unix SendMail server. Its
kind of weird that the first attempt fails, then subsequent attempts
(spanning multiple sessions) succeed. Has anyone seen this before?
what did you do to fix it?



Relevant Pages

  • Cant send email to one domain from my system but can from another
    ... I’m experiencing some peculiar behavior in sending email. ... I have an Exchange 2000 Server with latest Service Pack. ... SMTP Store Driver: Message Submitted from Store ...
    (microsoft.public.exchange2000.general)
  • RE: Sending Email from script
    ... Subject: Sending Email from script ... Mace, Nathan wrote: ... server doesn't have a proper name server entry, ... Note that your connection looks ok up to when our mail server tries ...
    (Debian-User)
  • Re: Cant send emails with Windows Mail
    ... Please contact support". ... There is nothing wrong with your Windows Mail. ... the proper server settings, please contact your e-mail service provider. ... Client host rejected: User account blocked from sending email due ...
    (microsoft.public.windows.vista.mail)
  • RE: Action: delayed Exchange 2003 SP1 SBS SP1
    ... Welcome to SBS newsgroup. ... I understand that you encountered 4.4.7 delay when sending email to ... this issue may occur if the destination mail server is busy at the ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Vista Email issue
    ... Still having problems with sending email. ... Your server has unexpectedly terminated the connection. ... not fully compatible with Windows Mail. ... I am able to surf the web without resetting the router. ...
    (microsoft.public.windows.vista.mail)