473,583 Members | 4,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please help... "Transport failed" error.. sending email using ASP

8 New Member
Hi all,

I am a complete newbie to ASP and am trying to send email from my gmail account to another gmail ID. Is it possible? I have my computer with no mail server installed. i have IIS installed and working. i have used the following code. I am getting the error..

CDO.Message.1 (0x80040213)
The transport failed to connect to the server.

the error is throwing at '.Send' line. the actual mail IDs given in from and to are real and existing ones... Please help me out..

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>Mail send</title>
  4.  
  5. <% 
  6.     sch = "http://schemas.microsoft.com/cdo/configuration/" 
  7.  
  8.     Set cdoConfig = CreateObject("CDO.Configuration") 
  9.  
  10.     With cdoConfig.Fields 
  11.         .Item(sch & "sendusing") = 2 
  12.         .Item(sch & "smtpserver") = "smtp.gmail.com" 
  13.         .update 
  14.     End With 
  15.  
  16.     Set cdoMessage = CreateObject("CDO.Message") 
  17.  
  18.     With cdoMessage 
  19.         Set .Configuration = cdoConfig 
  20.         .From = "myemail1@gmail.com" 
  21.         .To = "myemail2@gmail.com" 
  22.         .Subject = "Sample CDO Message" 
  23.         .TextBody = "This is a test for CDO.message" 
  24.         .Send 
  25.     End With 
  26.  
  27.     Set cdoMessage = Nothing 
  28.     Set cdoConfig = Nothing 
  29. %>
  30.  
  31.  </head>
  32.  
  33. <body>
  34.  
  35. </body>
  36. </html>
Thank u in advance..
Jan 31 '08 #1
8 6724
DrBunchman
979 Recognized Expert Contributor
Hi there,

You can follow these steps to send mail from your machine.

First you need to install default smtp server on your IIS. To do this go to Control Panel...Add/Remove Programs...Add/Remove Windows Components, select Internet Information Services and click details. There will be an smtp check box which you need to select then click next.

Now all you need to do is change one line in your code:

.Item(sch & "smtpserver ") = "smtp.gmail.com "

becomes:

.Item(sch & "smtpserver ") = "127.0.0.1"

This will send the mail from your smtp but it will appear in the inbox as being from whichever from address you specify. This does mean that any mail you send out will not appear in a 'Sent Items' box.

I hope this helps but if you have any problems then please let me know.

Good luck,

Dr B
Feb 1 '08 #2
kpdeepu
8 New Member
Hi there,

You can follow these steps to send mail from your machine.

First you need to install default smtp server on your IIS. To do this go to Control Panel...Add/Remove Programs...Add/Remove Windows Components, select Internet Information Services and click details. There will be an smtp check box which you need to select then click next.

Now all you need to do is change one line in your code:

.Item(sch & "smtpserver ") = "smtp.gmail.com "

becomes:

.Item(sch & "smtpserver ") = "127.0.0.1"

This will send the mail from your smtp but it will appear in the inbox as being from whichever from address you specify. This does mean that any mail you send out will not appear in a 'Sent Items' box.

I hope this helps but if you have any problems then please let me know.

Good luck,

Dr B

Thanks Dr B!
I checked my IIS details.. the smtp check box is already checked. i changed the smtpserver from smtp.gmail.com to 127.0.0.1. Now, it is throwing the following error at the same line:

(0x80040211)

Plzzzz help.. thanks a lot!
Feb 1 '08 #3
DrBunchman
979 Recognized Expert Contributor
Ah...there are a couple of things which I know of that you can check:
  • Check that your default smtp port is set to 25. If you go to the properties of your smtp in IIS (from running inetmgr) and click on the advanced button of the general tab it will show you which port you are using.
  • Have you got any kind of firewall or anti virus software running? McAfee and things like that can sometimes block smtp on port 25.
I'm sorry to say that smtp can be a real pain to get configured sometimes but i'm sure we'll get it cracked!

Dr B
Feb 1 '08 #4
kpdeepu
8 New Member
Ah...there are a couple of things which I know of that you can check:
  • Check that your default smtp port is set to 25. If you go to the properties of your smtp in IIS (from running inetmgr) and click on the advanced button of the general tab it will show you which port you are using.
  • Have you got any kind of firewall or anti virus software running? McAfee and things like that can sometimes block smtp on port 25.
I'm sorry to say that smtp can be a real pain to get configured sometimes but i'm sure we'll get it cracked!

Dr B
Still the same case! :( Checked both the above steps.. but still getting the same error.. i got some link..

http://www.gulfstreamw ay.com/dss/company/xlinesoft/ticket/ViewKBArticle.a sp?folder=xline soft&aid=74&cat id=27&f=1&vc=1& asktx=

followed the steps given there too.. but still not working :(
sorry if i am bugging.. wat can be done now??
Feb 3 '08 #5
kpdeepu
8 New Member
Another problem now.. :(

Hey the error is solved somehow.. but the mail is not getting delivered.. it is getting saved in C:\Inetpub\mail root\Queue folder. :(
Feb 4 '08 #6
JamieHowarth0
533 Recognized Expert Contributor
Hi kpdeepu,

Are you running this on your machine at home or on paid-for webspace of some kind, and if the former, what type of Internet connection do you have?

medicineworker
Feb 6 '08 #7
kpdeepu
8 New Member
Hi kpdeepu,

Are you running this on your machine at home or on paid-for webspace of some kind, and if the former, what type of Internet connection do you have?

medicineworker

Hi medicineworker,

i am running this on my office computer.
Feb 6 '08 #8
JamieHowarth0
533 Recognized Expert Contributor
OK, chances are your office uses some kind of DSL or cable service - which means you have a dynamic IP.

One of the adopted "laws" of the Internet by many ISPs is that of refusing mail from mail servers with dynamic IP addresses (commonly used by domestic ISPs). The reason is that 99% of mail sent by mail servers with a dynamic IP is produced by "botnet" software using your home PC as an email powerhouse to send out trash advertising discount Viagra and 419 fake lottery scams. This can be very frustrating for the small business or the avid tech home-user who wants to run a website and email server from home or on a cheap Internet connection (like me!).

My suggestion - either ask your ISP for permission to relay through their server or use a third-party company to relay. I use DNSExit and highly recommend their prices, although have had service issues previously.

Once you have found someone who will let you relay mail, the next thing to do is set up the relay so that every time an email is sent from your SMTP server (e.g. using ASP CDO).

Open Internet Information Services on your PC and go to "Default SMTP Virtual Server". Right-click on it and select Properties > Delivery. Click on the "Advanced.. ." button, and in the "Smart host" box, enter the address of the server that you will be relaying mail on to.

The idea of a relay server is literally to send mail onto a server but not alter any of the "to" or "from" fields - so it retains your email address and not that of your ISP!

Also make sure that if you have a firewall on your company network, that port 25 is open.

Hope it helps!

medicineworker
Feb 6 '08 #9

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

Similar topics

1
5092
by: Stefan Rijkaart | last post by:
Hello, has anyone experienced problems with XMLRPC library when trying to connect through authentication? I am calling a service on (example): http:\\myuser:mypassword@awebsite.com/file/file.xml And I get: "Something went wrong - -32300 : transport error - HTTP status code was not 200" I use the IXR_Library but also with another library...
0
4606
by: Bon | last post by:
Hello All I got "Tables are skipped or export failed" error when I used upsizing wizard on migrating MS Access 2000 to MS SQL Server 2000. I am changing my application backend database from MS Access 2000 to MS SQL Server 2000. My front end is MS Access interface. When I used the MS Access 2000's Upsizing Wizard for database migration,...
2
91029
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 objects. I was able to run my application fine for roughly 1500 email messages. The next time I tried sending mail, it stopped working with the...
1
2262
by: John Dalberg | last post by:
Running Crystal Reports with the hotfixes and patches & VS 2003. I created a CR report on my development server which has SQL Server. The report runs fine inside Visual Studio. When I switched the source of the DB to the production server using the 'set location' option in CR and ran the app again, I get "Logon Failed" error message. The...
1
1902
by: Roy | last post by:
Hey all, I have a VB App which uses the bundled version of Crystal Reports for VS.NET 2003. It works fine in when I run it using VS *but* when I deploy it anywhere (including the development PC itself) it won't load a report and displays the cryptic "Load Report Failed" error. It's frustrating. Why would it work great on my machine using...
2
3286
by: Jeff_Mac | last post by:
Hi there. I'm a bit of a newbie, and I would appreciate any help that anyone can give me on an error I'm getting with Crystal Reports. Every time I attempt to view a report using the Crystal Report Viewer, I get a "Load Report Failed" error, and I'm not sure what I can do to resolve it. I know it's not the connection to the data -- I'm...
1
1794
by: aaaaaa | last post by:
running a crystal (v10) reporting app on a virtual web server and getting the "Validation of viewstate MAC failed...." error when opening the crystal viewer. Any help please!!!
4
2572
by: MadeOfRose | last post by:
Hi all i was using cdo object for sending email to a customers. when use win2000 server or windows xp my script works correctly. but not on win2003 server r2. Different thing on my script is i use external smtp server to send my emails. for example, i dont use the iis' virtual smtp server. i assign an another smtp server
0
1823
by: t0nt0n | last post by:
i have an xp OS service pack 2 currently working on a project that uses ms access 2003 with mysql 5.0 backend... i get an odbc--call failed error when I manually changed the system date in my computer.... I need to do this to test if my code works alright but instead the error occurs..... sometimes the error will not occur but often times...
0
2172
by: jianxin9 | last post by:
Hi everyone, I don't have a lot of experience with ASP and I was hoping someone could help me. I want to use our ASP form along with some javascript code to create a form where our patrons can select which department they will send the form to (we are trying to consolidate forms). This is what I have so far, but when I test the form, I keep...
0
7825
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8179
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8323
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7933
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8191
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3816
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1155
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.