© 2016, Mike Murach & Associates, Inc. Chapter 21 © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. Objectives © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. Objectives (cont.) © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. How email works © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. Three email protocols © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Three common reasons for sending email © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
The third-party Papercut SMTP server application interface © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
An email notification when Papercut is minimized in the system tray © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
How to install and work with Papercut © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Constructors of the MailMessage class © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Properties of the MailMessage class © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Constructors of the MailAddress class © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Code that creates an email message with a carbon copy © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Another way to create a message © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Constructors of the SmtpClient class Methods of the SmtpClient class © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
SMTP configuration settings in a Web.config file © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Code that sends a message using settings in the Web.config file Code that creates and sends a message to a named server © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
The syntax for creating an attachment © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
One way to create a new attachment and add it to a message Another way to create a new attachment and add it to a message © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A multipart email message with both text and HTML © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A method that sends a multipart email message © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A method that sends a multipart email message (cont.) © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
An HTML email message with an embedded image © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A method that sends an embedded image © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A method that sends an embedded image (cont.) © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A custom error page in a browser © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Four ways to display a custom error page when an exception occurs © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Common properties of the Exception class © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Methods of the HttpServerUtility class for working with exceptions © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Code that gets the last Exception object at the method level © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. Code that gets the last Exception object at the page or application level Code that gets the last Exception object in a non-page code file Code that gets the inner Exception object © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A custom error handling class © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A custom error handling class (cont.) © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. An Application_Error method in the Global.asax file that uses the error handling class © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A customErrors element in the Web.config file for custom error pages © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Common HTTP error codes © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. A back-button problem in the Cart page of the Shopping Cart application © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. A back-button problem in the Cart page of the Shopping Cart application (cont.) © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Three ways to handle the back-button problem © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
The normal postback pattern for a page © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
The C# code for a method that uses the normal postback pattern © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
The Post-Redirect-Get (PRG) pattern for a page © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
The C# code for a method that uses the PRG pattern © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A page that checks timestamps © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
A page that checks timestamps (cont.) © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
Extra 21-1 Send an email from the Halloween Store application © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. Extra 21-2 Add custom error handling to the Halloween Store application © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015
© 2016, Mike Murach & Associates, Inc. Extra 21-3 Handle the back-button problem in the Halloween Store application © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015