Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 4th, 2007, 07:26 PM
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Question Re Sending mail in Chapter 3

Hello !

i'm trying to send mail using the Contact.aspx form in Chaper 3.
However, i get the message that there was a problem sending my
mail, and when I print out the Exception message it turns out to be:
"System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: The remote name could not be resolved: '(localhost)'"

So my question is, is the setting in system.net section supposed to be
<network defaultCredentials="true" host="(localhost)" port="25"/>

or should I actually replace the string "(localhost)" with
something more specific ?

i'm not very knowledgable in networking, so i'm not sure how this
whole mail sending process works...should my computer have any
specific settings, like some open ports or something..???

thanks alot for any tips...

--fluffy

  #2 (permalink)  
Old January 5th, 2007, 04:48 PM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default

your computer should have an smtp provider that allows you to send mails

check this page : http://www.microsoft.com/technet/pro....mspx?mfr=true

koen

  #3 (permalink)  
Old January 7th, 2007, 10:28 AM
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you include the smtp deliveryMethod?

  #4 (permalink)  
Old January 7th, 2007, 11:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The SMTP service isn't used by ASP.NET to deliver email. It uses CDOSYS which is included with Windows. It normally figures out how to locate the proper SMTP server to handle your outgoing mail (it can locate MS Exchange automatically, but I'm not sure about other SMTP servers). You can always hard-code the specific name of the SMTP server handling your web server.

In your case it looks like you gave it the name of your local SQL Server (which likes parens). The name of your web server does not have parens. If you change it to "localhost" you should be happy.

Some SMTP servers want you to authenticate with them (but most do not since they only accept outgoing mail from their local network, which includes your web server):
http://www.codeproject.com/dotnet/Sy..._SMTP_AUTH.asp

Eric

  #5 (permalink)  
Old January 8th, 2007, 05:53 PM
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay, thanks a lot...Now I get it- I didn't have an smtp server installed !

  #6 (permalink)  
Old January 9th, 2007, 12:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You don't need the SMTP server if you have an exchange server accessable by your web server. You just need to fix the hostname. Use "localhost", and not "(localhost)".

Eric

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
sending mail hastikeyvan ASP.NET 2.0 Basics 0 June 10th, 2006 09:17 AM
sending mail ashokparchuri General .NET 3 May 5th, 2005 03:42 AM
Sending e-mail to different mail box! Calibus Classic ASP Databases 4 September 3rd, 2004 06:48 PM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 02:05 AM



All times are GMT -4. The time now is 08:48 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.