Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 April 21st, 2011, 01:34 AM
Registered User
 
Join Date: Apr 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default chapter 9... Sending email msg

Hello there,
I'm having trouble finishing the try out: Sending e-mail messages.
Once I try this in the browser it shows the following error:
Can some one help me with this please?
Thanks

Server Error in '/' Application.
--------------------------------------------------------------------------------

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 65.55.162.200:25


Exception Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 65.55.162.200:25

Source Error:


Line 17: myMessage.To.Add(new MailAddress("[email protected]", "argonz"));
Line 18: SmtpClient mySmtpClient = new SmtpClient();
Line 19: mySmtpClient.Send(myMessage);
Line 20: }
Line 21: }


Source File: c:\BegASPNET\Site\Demos\Email.aspx.cs Line: 19

**************
I checked the web.config and it looks like this
<mailSettings>
<smtp deliveryMethod="Network" from="argonz &lt;[email protected]&gt;">
<network host="smtp.live.com" userName="[email protected]" password= "******"
port="25" />
</smtp>
</mailSettings>
 
Old April 21st, 2011, 02:39 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I don't know the exact specifics of live.com, but I think it requires SSL and port 587. This means you'll need to modify the code and set EnableSsl to true as explained in the book. In addition, you need to set the port in the web.config file.

If that doesn't fix it, take a look here:

http://www.google.com/#q=asp.net+sen...tp.live.com%22

You'll find a bunch of articles related to sending mail with Live.com that may help.

Hope this helps, and if not, let me know.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
mivanov007 (September 8th, 2011)
 
Old April 21st, 2011, 04:06 AM
Registered User
 
Join Date: Apr 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Wink Thanks Imar, it worked

Imar,

First I wanna say that I enjoy reading and practicing the try outs from your book; with that said.
The link you shared with me was helpful. I was getting stuck in the step where we need to send the info in the "contact us" page. (p316) But I found good help in that link.
This is how my code in web.config ended like: Apparently it didn't work with hotmail.com then I switched to gmail.com

<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="Argonz &lt;[email protected]&gt;">
<network host="smtp.gmail.com" userName="[email protected]" password= "*****"
port="587" defaultCredentials="false" />
</smtp>
</mailSettings>
</system.net>

Regards
Thanks again...
 
Old April 21st, 2011, 04:12 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
First I wanna say that I enjoy reading and practicing the try outs from your book
That's good to hear!

Glad you got it working.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 9 sending email pg 323-326 nzg5 BOOK: Beginning ASP.NET 4 : in C# and VB 3 September 17th, 2010 03:17 PM
Chapter 9:page 310,sending email messages Arya BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 January 4th, 2010 09:51 PM
Sending email Sheraz Khan Classic ASP Basics 1 December 12th, 2009 12:58 AM
Sending email maitias C# 2005 2 February 17th, 2006 11:24 AM





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