[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Send Email Error : Transport failed to connect to the server

Posted on 2007-10-15
5
Medium Priority
?
1,993 Views
Last Modified: 2013-11-07
I have a code which sends NewsLetter to the users. Below is the code.

Dim objEmail as New MailMessage
sBody = "This is our test email to you"
objEmail.Subject="This is my Subject"
Dim MySQL as string = "Select Name, email from TestMail"
Dim MyConn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("YourConfigSettings"))
Dim objDR as SQLDataReader
Dim Cmd as New SQLCommand(MySQL, MyConn)
MyConn.Open()
objDR=Cmd.ExecuteReader(system.data.CommandBehavior.CloseConnection)

While objDR.Read()
      sEmail = objDR("email")
      objEmail.To =sEmail
      objEmail.FROM="fromYou@YourDomain.com"
      objEmail.Body=sBody & vbcrlf & "Name: " & objDR("Name") & vbcrlf & "Email: " & sEmail
      objEmail.BodyFormat = MailFormat.Text
      SmtpMail.SmtpServer ="mail.YourDomain.com"
      SmtpMail.Send(objEmail)
      lblEmails.text+=sEmail & "<br>"
End While
MyConn.Close

Above in TestMail table there more than 1000 users. While loop is generating error "transport failed to connect to the server" after sending around 100 emails.

I am running this code on public server using ASP.NET (VB.NET).

What can be the reason for this and solution for same. Please help
0
Comment
Question by:dipak_in_2k
  • 3
5 Comments
 
LVL 9

Expert Comment

by:noulouk
ID: 20077081
Hi dipak in 2k,

The server can't queue all your messages.
Take a look at this solution:
http://www.codeproject.com/cs/internet/smartmassemail.asp

Hope this helps.
0
 
LVL 3

Author Comment

by:dipak_in_2k
ID: 20077153
Hi Noulouk

Thanks for reply. Now the issue is i am using ASP.NET 1.1 with SQL Server 2000 and website is loaded on Public Web Hosting Server. Can you please suggest me another solution in this context.
0
 
LVL 3

Author Comment

by:dipak_in_2k
ID: 20083530
Can anybody help on this issue.
0
 
LVL 23

Accepted Solution

by:
Ashish Patel earned 1440 total points
ID: 20355786
The best way is to ask your service provider for news letter sending email facility.
0
 
LVL 3

Author Closing Comment

by:dipak_in_2k
ID: 31408166
Thanks.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Ranking ecommerce websites is a vital process. You need to have a strong SEO (Search Engine Optimization) strategy. If you don’t have one, you are losing out on brand impressions, clicks and sales. Check this guide on how to improve website traffic …
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question