Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 9th, 2005, 02:08 PM
Authorized User
 
Join Date: Apr 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Its a different exception. "The transport failed to connect to the server"

^when I specify my ip address as the server(the smtp server shows that it connects but then closes the connection immediately).

"The message could not be sent to the smtp server. The transport error code was 0x80040217. The server response was unavailable."
^when I comment out the system.web.mail.smtpserver line

Its curious because the server is showing that my ip address is connecting but I get that error and the server shows that its closing the connection.



 
Old May 10th, 2005, 10:10 PM
Authorized User
 
Join Date: Apr 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now I have set up a server running windows server 2000 and set up the virtual smtp server. I specified the server in my code as the ip address of the server. I am getting the same exceptions. Whats the deal?


 
Old June 3rd, 2005, 01:46 PM
Registered User
 
Join Date: Sep 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I met the same problem this morning.

In my case, my boss changed the Smtp server in my machine but I didn't realize it. After I changed to the correct SmtpServer. My code works AGAIN!

MailMessage objEmail = new MailMessage();
// Make sure you have appropriate replying permissions from your local system
SmtpMail.SmtpServer = "REAL SMTPSERVER"

If you can send email using Outlook, you can find your SmtpServer at tools->Email Accounts -> Outbox server.

Hope you don't make the same mistake.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending EMAIL charleshua BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 16 September 3rd, 2008 12:27 AM
code for Sending Email in jsp mhadz JSP Basics 0 January 12th, 2007 03:55 AM
Sending email maitias C# 2005 2 February 17th, 2006 11:24 AM
email sending msrnivas .NET Web Services 6 June 26th, 2004 06:59 AM
sending Email thru ASP Code zaeem Classic ASP Basics 4 November 13th, 2003 04:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.