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 May 3rd, 2009, 06:15 AM
Authorized User
 
Join Date: Apr 2009
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 9 & 10 starttls

Hello,
I am trying to get the contactform.acsx exercise going. 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. g14sm12076631rvb.52

The research I have done advises that the enablessl = true; command must be issued after declaring the mysmtpclient.
myMessage.To.Add(new MailAddress("[email protected]", "Receiver Name HEre"));

SmtpClient mySmtpClient = new SmtpClient();
mySmtpClient.EnableSsl = true;
try
{

mySmtpClient.Send(myMessage);

The thing is that i have done this in the contactform.ascx.cs file

and there is no change.

Help

Thanks

tomche
 
Old May 3rd, 2009, 06:29 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 tomche,

The error message also says "or the client was not authenticated". Maybe your ISP requires you to authenticate? Have you set a user name and password in the mail settings in the web.config file?

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 Nine: Must issue a STARTTLS areed24 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 25 September 22nd, 2009 02:00 AM
CSS Instant Results: Project 6 & 10 ericcutty BOOK: CSS Instant Results 1 October 11th, 2007 08:45 AM
Chapter 10 czambran BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 March 29th, 2005 09:35 AM
ASP & Crystal Report 10 samik_tanik Classic ASP Basics 1 August 20th, 2004 12:27 AM





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