Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: ASP.NET .NET Sending E-Mails using ASP.NET (Part I) Tutorial

In part I of this tutorial, learn how to send simple e-mails (both text and HTML) using ASP.NET.

Tutorial Details:

ASP.NET .NET Sending E-Mails using ASP.NET (Part I) Tutorial
In this tutorial we will learn how to send e-mails of both text and HTML formats using classes of System.Web.Mail namespace. Before delving in to the source code, I'll briefly explain the MailMessage and SmtpMail classes which we'll be using to send e-mails.
System.Web.Mail.MailMessage

An object of this class represents a single e-mail message. Properties of this class are listed below :
Properties of MailMessage
To use this class, we create a new object using the empty constructor, set some of it's properties and then send the message using static method of SmtpMail class's Send() method.

MailMessage mail = new MailMessage();

mail.To = "receivers@email.address";
mail.From = "senders@email.address";
mail.BodyFormat = MailFormat.Text;
mail.Subject = "Subject of this Email";
mail.Body = "Body of this message.";

SmtpMail.Send(mail);
All the code required to create and send a MailMessage object has been shown above. If you've understood this code then you don't need to go any further. Just change the values to suite your needs. In the rest of this article we will create a sendMail.aspx page which will make use of the above code.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
ASP.NET .NET Sending E-Mails using ASP.NET (Part I) Tutorial

View Tutorial:
ASP.NET .NET Sending E-Mails using ASP.NET (Part I) Tutorial

Related Tutorials:

Sockets programming in Java: A tutorial - JavaWorld December 1996
Sockets programming in Java: A tutorial - JavaWorld December 1996
 
C# : A language alternative or just J--? (part1)
C# : A language alternative or just J--? (part1)
 
Rumble in the jungle: J2EE versus .Net, Part 1
Rumble in the jungle: J2EE versus .Net, Part 1
 
Rumble in the jungle: J2EE versus .Net, Part 2
Rumble in the jungle: J2EE versus .Net, Part 2
 
A first look at JavaServer Faces, Part I
A first look at JavaServer Faces, Part Learn how to implement Web-based user interfaces with JSF
 
Let the mobile games begin, Part 2
Let the mobile games begin, Part 2
 
The Java Web Services Tutorial
This tutorial is a beginner\'s guide to developing Web services and Web applications using the Java Web Services Developer Pack (Java WSDP).
 
Very interesting tutorial
Introducing the JavaMail API The JavaMail API is an optional package (standard extension) for reading, composing, and sending electronic messages. You use the package to create Mail User Agent (MUA) type programs, similar to Eudora, Pine, and Microsoft O
 
JLAN Server v3.3
JLAN Server v3.3 JLAN Server is a high performance JavaTM based file server supporting Windows file sharing (SMB/CIFS), NFS and FTP protocols. Write your own virtual filesystems with the core server handling all protocol exchanges with the client. Incl
 
Create Intelligent E-mail Filters with JavaMail and Classifier4j
Create Intelligent E-mail Filters with JavaMail and Classifier4j Tired of the limitations and annoying false positives with commercial spam filters? Classifier4J is an open source Java library that will let you build custom applications that read e-mails
 
Accessing the Database from Servlet
This article shows you how to access database from servlets. Here I am assuming that you are using win95/98/2000 and running Java Web Server.
 
Jeff Schmitt's JDBC Page
This tutorial assumes you are using the MySQL database and the GWE JDBC drivers. The host computer is triton.towson.edu.
 
The JavaTM Web Services Tutorial
A beginner's guide to developing Web services and Web applications on the Java Web Services Developer Pack
 
Calling JavaBeans from a JSP Page
We will be using this SimpleBean class in this tutorial, so if you haven't read above article then I suggest you do it now.
 
Welcome to the Apache Struts Tutorial
This is the complete Struts Tutorial. Explains ActionForm Action Class Validation Framework.
 
Interoperability with Patterns and Strategies for Document-Based Web Services
In Part 2 of this article, we demonstrate interoperability for document-driven web services with Microsoft .NET (C#) using strategies discussed in Part 1.
 
Welcome to Java Developers paradise!
Welcome to Java Developers paradise! T his site contains many quality Java, JSP, RMI, MySQL downloads, tutorials, source codes and links to other java resources. We have large number of links to the tutorials on java which will help you learn java
 
Open Source Web Frameworks in Java
Open Source Web Frameworks in Java Open Source Web Frameworks in Java Struts Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for the JSP. Struts is maintained as a part of Apache Jakarta project and is open
 
Struts Guide
Struts Guide Struts Guide This tutorial is extensive guide to the Struts Framework. In this tutorial you will learn how to develop robust application using Jakarta Struts Framework. This tutorial assumes that the reader is familiar with the web
 
What is WAP? Detailed discussion of WAP API with examples.
What is WAP? Detailed discussion of WAP API with examples. Learn WAP in 60 minutes W ireless Application Protocol or WAP for short, allows the developers to develop next generation web application for cellular devices. Through WAP enabled mobile
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.