473,320 Members | 1,724 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,320 software developers and data experts.

Getting Error In System log while sending mail -

Hi ,
I am getting the error in system log that " The remote server did not respond to a connection attempt."

i am using following code for sending mail

/**************** Work for sending mail ****************/
// All the mail settings are extracted from the web.config file.
string from = ConfigurationManager.AppSettings["EmailFrom"].ToString();
string SMTPServer = ConfigurationManager.AppSettings["SmtpServer"].ToString();
string to = table.Rows[0]["SVU_EMAILID"].ToString();
string subject = ConfigurationManager.AppSettings["Subject"].ToString();
string body = "Your password is:-" + _newPassword;
string password = ConfigurationManager.AppSettings["Password"].ToString();
SmtpClient mailClient = new SmtpClient();
mailClient.Credentials = new System.Net.NetworkCredential(from, password);
mailClient.Host = SMTPServer;
mailClient.UseDefaultCredentials = false;
SmtpMail.Send(from, to, subject, body);



Some time the mail is send properly but most of the time no exception arrise and mail is not sent .

Can anyone help me in this regards

Thanks In Advance
Sachin Jain
Apr 7 '07 #1
1 1384
kenobewan
4,871 Expert 4TB
Welcome to the site. How do you know the email is not sent? Maybe it is blocked or filtered as spam? What testing & debugging have you done?
Apr 8 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Janna Deegan | last post by:
Hello all, First off, if there is a better place to post for an answer to this question, please feel free to point me there. I have some very strange behavior happening with my System.web.mail...
9
by: B-Dog | last post by:
I've built a small app that sends mail through our ISP's SMTP server but when I try to send through my local exchange server I get CDO error. Does webmail use SMTP or does it strictly rely on...
2
by: Chris Rennie | last post by:
I've developed an application that is using the System.Web.Mail namespace and have run into a rather interesting problem. The aforementioned error displays this: The following exception...
2
by: JackBlack | last post by:
Using VS.Net 2k3, 2.0 Framework installed... So, I'm sitting here trying to do a very basic SMTP mailer, and I'm struggling with getting either System.Web.Mail (1.1) to work, or System.Net.Mail...
11
by: hazz | last post by:
smtpClient.Send(message) is causing me problems as per specifics in the trace below. Email is sent but not without this error typically upon sending the second email, but sometimes when running...
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,...
2
by: satnamsarai | last post by:
Using System.Net.Mail: Sometimes I get error 'failure sending mail. Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.' Not sure how...
3
by: raj200809 | last post by:
when i m sending mail i received error from symantec Antivirus" Your email message was unable to be sent because your mail server rejected the message 550-5.7.1 the ip you’re using to send mail is...
5
by: Don Quijote de Nicaragua | last post by:
Hi, everyone I try to send a simple e-mail witch this Code, but always send me a error messages: "ERROR: Failure sending mail." Thansk You. Don Quijote de Nicaragua. Elder Soto. Dim correo As...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.