473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SMTP mail problem

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 = "so*****@fromsite.com";
mail.To = "so*****@tosite.com";
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
Nov 16 '05 #1
4 3445

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 ?
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 16 '05 #2
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
"Shawn Zheng" <sz********@rogers.com> escribió en el mensaje
news:u9**************@tk2msftngp13.phx.gbl...
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 = "so*****@fromsite.com";
mail.To = "so*****@tosite.com";
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

Nov 16 '05 #3

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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4
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,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Shawn Zheng" <sz********@hotmail.com> wrote in message
news:uA*************@TK2MSFTNGP14.phx.gbl...

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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike Obiku | last post by:
First of all, I'm new to PHP. For my website I have some PHP scripts to run a photo database. New users have to register them selfs. After registring the new user is getting an e-mail maid by an...
2
by: Martin Lucas-Smith | last post by:
I'm finding when a mail is sent from a script, I get: Warning: mail() : Failed to connect to mailserver at "smtp.ntlworld.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or...
2
by: RandRace | last post by:
I'm having some problems with a little script i wrote using net::smtp. I originally wrote it in linux where it works perfectly. I tried to use it from windows the other day and it doesn't work. It...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
4
by: CLEAR-RCIC | last post by:
I want to send an email from our Intranet site to myself whenever an error happens. Our manager will not let us install SMTP on the web server. Is it possible to send email programatically...
2
by: oliu321 | last post by:
Hi, First I am not trying to write a client to talk with hotmail straightly. I am trying to write some codes to send emails through a SMTP server. I wrote a C++ version using pure socket...
11
by: ibiza | last post by:
Hi all, I am trying to use the System.Net.Mail class for the first time, with ASP.NET 2.0. I setup everything according to http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives...
7
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee...
2
by: =?Utf-8?B?QWRl?= | last post by:
HI All, I am encountering the following error when I try to send an email through a SMTP server. I believe the problem lies with the authentication part when the network crednetials are used,...
7
by: Rob Dob | last post by:
The following code is giving me a timeout problem., no matter what I do I can't send a piece of mail using .net2.0 System.Net.Mail.SmtpClient via port 465 and using ssl, if however I try using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.