Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 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 8th, 2015, 01:33 PM
Authorized User
 
Join Date: Mar 2011
Posts: 12
Thanks: 2
Thanked 0 Times in 0 Posts
Default Exception thrown sending email messages

In the book "Beginning ASP.Net 4.5.1 "by Imar - In the "Try-It-Out" Sending E-Mail Messages on p. 324 in Chapter 9 in Step 5 when I request Email.aspx in the browser I get the following exception:

-----
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Authentication required
Email.aspx.vb
Line 16: mySMTPClient.Send(myMessage)
------

I entered the proper information in the web.config file to send an email from my Yahoo account to my Outlook account. I included enableSsl="true" port="587" in the <network> tag. I tried removing the enableSSl and port tag - same exception. I tried sending from Outlook to Yahoo and got a slightly different exception thrown:

-----
Mailbox unavailable. The server response was: 5.1.0 Authentication required

Email.aspx.vb
Line 16: mySMTPClient.Send(myMessage)

-----

THis error is affecting the next exercise and the chapter on AJAX. Any help is much appreciated. Went online and tried a few suggestions but none worked.
Any thoughts?
Thanks!

Last edited by Onypips; April 8th, 2015 at 03:55 PM..
 
Old April 8th, 2015, 06:33 PM
Authorized User
 
Join Date: Mar 2011
Posts: 12
Thanks: 2
Thanked 0 Times in 0 Posts
Default Using gmail instead of outlook worked

I used a gmail account and took out the outlook account and things are working correctly. Must be some authentication problem with MSOutlook? If anyone has any insight into why Outlook is the reason the exception is being thrown, please post.
 
Old April 9th, 2015, 03:47 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Do you have two-factor auto enabled for Outlook.com? If so, yo may need an app-specific password: http://www.codeproject.com/Articles/...k-Com-SMTP-Hos

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:
Onypips (April 14th, 2015)
 
Old April 14th, 2015, 01:17 AM
Authorized User
 
Join Date: Mar 2011
Posts: 12
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I was trying to use the Microsoft outlook that came with MS Office on my machine using Comcast as my smtp. I guess it cant be done this software - I don't have an Outlook.com account. Thanks for pointing this out.
 
Old April 14th, 2015, 05:05 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You might be able to use your Comcast account (which then wouldn't use your local Outlook but communicate with Comcast directly) but they may have special requirements for things like server name, port and user credentials:

http://stackoverflow.com/questions/1...ived-php-works
https://www.google.com/?gfe_rd=cr&ei...ast+smtpclient

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:
Onypips (April 14th, 2015)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception thrown Sending E-Mail Messsages Chapter 9 Onypips ASP.NET 4.5.1 General Discussion 1 April 19th, 2015 01:27 AM
Sending Email Messages Deathplagous BOOK: Beginning ASP.NET 4 : in C# and VB 3 July 16th, 2012 03:30 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
Autosuggest Exception thrown jellie BOOK: Professional Ajax ISBN: 978-0-471-77778-6 3 March 14th, 2006 10:19 AM
Exception thrown Invalid_Viewstate r_ganesh76 ASP.NET 1.0 and 1.1 Professional 1 December 2nd, 2005 04:32 PM





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