SMTP mail problem

  • Thread starter Thread starter CometJoe
  • Start date Start date
C

CometJoe

MailMessage msgInfo = new MailMessage();

...set up To, From, & Body the same like you did...then just send

SmtpMail.Send ( msgInfo );


Let me know if it doesn't work. Sorry, I'm in a hurry, but I'm not
familiar with SmtpMail.Server.Insert() . Are you trying to point to a
mail server other than your default ?
 
I have a problem with SmtpMail.Send. the message sent by SmtpMail.Send stuck
in Inetpub\mailroot\Queue folder could not be sent out. The SMTP server is
in Windows 2000 server. the code that I used is:
MailMessage mail = new MailMessage();
mail.Form = "(e-mail address removed)";
mail.To = "(e-mail address removed)";
mail.Body = "test";
mail.Suject = "test";
SmtpMail.Server.Insert(0, "127.0.0.1"); //I also tried
SmptMail.Server.Insert(0, "smtp.mail.yahoo.com");
SmtpMail.Send(mail);

Shawn
 
If you don´t get an exception by code but the e-mails remain in the Queue
folder, use the Event Viewer to see the logged SMTP errors. Also, for
troubleshooting Web mail, see http://systemwebmail.com/

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
 
I did not receive errors both in program and Event Viewer. I coded try,
catch blocks to catch error, but it does not hit the error. This seems
does not occur in Windows 2003 standard edition but happens in XP and
Windows 2000 server.
Is it possible in the SMTP server settings or server side settins?

Thank you for the help.


Shawn
 
Hi,

I would look into the SMTP server config.

also I have never use Insert on SmtpServer class, I have always use
SmtpMail.Server to set the server.

cheers,
 
Back
Top