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 January 22nd, 2010, 12:05 PM
Registered User
 
Join Date: Nov 2009
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default Smtp protcol

Hey Imar,

How are you? I have a problem comming straight out of the book regarding the contact us page from chapter 9. how do we setup the smtp setting if we have email provider like hotmail, gmail etc. i tried smtp.hotmail.com but it says the Remote host cannont be found.

your help is much appreciated
 
Old January 22nd, 2010, 02:58 PM
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,

Take a look here: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=505

I don't know Hotmail's SMTP server, but I am pretty sure bing.com knows it (if SMTP is available with hotmail).

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!
 
Old January 25th, 2010, 06:53 PM
Registered User
 
Join Date: Nov 2009
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default Smtp

Hello Imar,

Thanks for your help. I tired using my gmail account for contact us page.

the smtp setting is smtp.gmail.com in the web config file....i get this error after i do it...

the mail setting looks like this

<mailSettings>
<smtp from="[email protected]">
<network host="smtp.gmail.com" password="*******" userName="[email protected]" />
</smtp>
</mailSettings>

i get the following error

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. 22sm283886qyk.14

The code that we can find in your book, does it support settings for gmail..if not what email client you reccomend i should use.

Thank you
Birendra chand
 
Old January 26th, 2010, 03:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Isn't that described exactly in the article I linked to?

Quote:
  1. Configure the web.config file and set up a mail server with a specified port number, user name and password.
  2. Handle the SendingMail event that the Login controls fire and execute the following steps:
    1. Create your own instance of the SmtpClient
    2. Set EnableSsl to true
    3. Send the message (which you can access using e.Message) with your own SmtpClient
    4. Cancel the original message.
So you need to add a port number in web.config and set EnableSsl to true...

Together with the article, you should be able to use GMail (or any other SMTP server) with the code in the book.

Cheers,

Imar
---------------------------------------------------------------------------------------------------------------------
Imar Spaanjaars
Web: Imar.Spaanjaars.Com Twitter: ImarSpaanjaars

Author of Beginning ASP.NET 4 : in C# and VB | Beginning ASP.NET 3.5 : in C# and VB | ASP.NET 2.0 Instant Results.
While typing this post, I was listening to: Elysium by Portishead (From the album: Portishead) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Smtp teddyk ASP.NET 2.0 Basics 5 November 1st, 2008 03:46 PM
SMTP problem adorable.ashish ASP.NET 2.0 Professional 0 March 7th, 2008 04:36 AM
Mail(SMTP) ajit Java Basics 2 October 24th, 2007 12:01 AM
Help on C#/SMTP peri C# 2 December 6th, 2004 10:43 PM
About SMTP abdul_owiusa C# 2 August 6th, 2004 06:12 AM





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