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

The transport failed to connect to the server. ASP, VBScript

Hi,

I am a newbie to ASP and VBScript. I have a bizzare error that I have been trying to trouble shoot for about 2 days now. Essentially I have been jumping from one website to another to try and solve the problem.

Problem Description:
I am trying to use VBScript To Send Email Using CDO and this is code I have for it (with the credentials filtered)

Expand|Select|Wrap|Line Numbers
  1.  
  2. sub request_recommendation(ID)
  3.  
  4.     insert_recommend_request(ID)
  5.     dim cname
  6.     cname = get_reference(request.form("csmp_id"))
  7.     dim strSubject, emailText
  8.  
  9.     strSubject = "Recommendationp"
  10.     emailText = "<b> " & cname & " is testing this email functionality.<br/>"
  11.  
  12.     'Create the mail object
  13.     Set objMessage = Server.CreateObject("CDO.message")      
  14.     objMessage.TO = request.form("email")  
  15.     objMessage.From = "myusername@mymail.com"
  16.     objMessage.Subject = strSubject   ' Specify the subject line
  17.     objMessage.htmlBody =  emailText
  18.  
  19.     'Configs
  20.     objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")= 2
  21.     objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp-server.com"
  22.     objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
  23.     objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "myusername@mymail.com"
  24.     objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mypassword"    
  25.     objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =25 
  26.     objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
  27.     objMessage.Configuration.Fields.Update
  28.  
  29.     'Enable send
  30.     ON ERROR RESUME NEXT
  31.     objMessage.Send
  32.  
  33.     set objMessage = nothing
  34. end sub    
  35.  
When this function is executed (called from a view) I am getting this error: "The transport failed to connect to the server." The odd thing is that this same code was working perfectly about a week ago but this error started occurring 2 days ago. I have double checked the code for any typos but I don't see anything wrong with it.

Someone mentioned that this may be due to a network problem. "They suggested checking to ensure the server System.Web.Mail is executing and can connect to the mail server. Because sometimes firewalls or proxy servers can get in the way."

Is anyone familiar with:
1)How to check if the server is executing and connecting to my mail server.
2) How to check if firewalls or proxy servers are getting in the way.

Detailed steps on how to carry out these checks will be greatly appreciated because I am not sure what the problem is and I am speculating that this may be the issue.

Any other suggestions may be helpful too but YES I have looked up a lot the forums that google returns and they haven't been helpful so far.

Thanks
Jan 27 '12 #1
0 2075

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

Similar topics

12
by: James Lankford | last post by:
Hello group: I have reached the end of my rope with this error. I have pretty much tried every suggestion I've found thus far and I get this error no matter what I do. I did try using the CDOSYS...
0
by: Lori McDonald | last post by:
I have code that I am using to sent an HTML email. (see code below) Intermittently I am getting the following error when I try and send an email message from ASP.Net code on my server. 80% of the...
0
by: mamatha | last post by:
Hi i have one email application in VB.I want to send an Email through SMTP server.While i am sending it gives error like"transport failed to connect to the server" can help anyone for me ...
1
by: Sudhan | last post by:
When i am trying to send in asp.net i am geting this Error Message:Transport Failed to connect to the Server. I am using SMTP server in my localMachine and Sify connction I am New to ASP.Net MY...
0
by: Hawksey | last post by:
Hello, Has anyone else experienced a similar problem. We get an intermittent error trying to send mail using smtpmail. Our SmtpMail.SmtpServer is a different server to our web application...
5
by: Nathan Sokalski | last post by:
I am attempting to send an email using ASP.NET 1.1's Mail.SmtpMail.Send() method. My code contains all of the following: Dim mailmsg As New Mail.MailMessage Mail.SmtpMail.SmtpServer =...
0
jpcarre
by: jpcarre | last post by:
Hello all, I have a testing server and a development server. In the testing server my CDOSYS email application works fine, I am using an external smtp port which is smtp.serv.cgnet.com , however,...
0
by: wizromeo | last post by:
Hello, Has anyone else experienced a similar problem. We get an intermittent error trying to send mail using smtpmail. Our SmtpMail.SmtpServer is a different server to our web application...
1
by: dancer | last post by:
Using Framework 1.1, ASP.net 1.1 I test my applications that send e-mail on my personal computer : iis - local host - wwwroot - no problems. Then all of a sudden I get this error: "Transport...
0
by: daredevil | last post by:
hi all, i am newbie here. i was trying to send mail from ASP, but i encountered the error as below:- CDO.Message.1 (0x80040213) The transport failed to connect to the server. i already google...
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: 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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.