System.Net.Mail
Complete FAQ for the System.Net.Mail namespace found in .NET 2.0 (
Click here for System.Web.Mail
)
»
Home
FAQ ITEMS
»
1.0 Introduction
»
2.0 System.Net.Mail Classes
»
3.0 Quickstart Samples
»
4.0 Advanced Samples
»
5.0 Troubleshooting
»
6.0 Additional Help
»
Complete FAQ
MORE STUFF
»
Support Forums
»
Source Code
»
Submit Comments
»
About Me
»
About My Products
»
Search This Site
Ads by Advanced Intellect
ASP.NET Email
The complete .NET control. Voted #1 by the .NET Community
www.aspnetemail.com
POP3 for .NET
A highly efficient POP3 control for .NET
Includes spam checking.
www.aspnetpop3.com
IMAP for .NET
Spam checking, email and folder management, internationalization, and much more.
www.aspnetimap.com
Bounce Email Control
Finally control bounced emails from your email campaigns. Includes 11 categorizations.
www.ListNanny.NET
System.Net.Mail FAQ
Complete FAQ Listing
3 Quickstart Programming Samples
* You Are Here *
[
Scroll To Answer
]
3.1 Working with the Body
3.1.1 How do I send a plain text email?
3.1.2 How do I send a simple Html email?
3.1.3 How do I create a Multi-Part mime message?
3.2 Working with Addresses
3.2.1 How do I change the FROM address to a friendly name?
3.2.2 How do I change the TO address to a friendly name?
3.2.3 How do I specify multiple recipients?
3.2.4 How do I create a friendly non-ascii display name?
3.3 Working with Headers
3.3.1 How do I change the email priority?
3.3.2 How do I add the Reply-To header to the MailMessage?
3.3.3 How do I request a read receipt?
3.3.4 How do I add custom headers to the MailMessage?
3.4 Working with Attachments
3.4.1 How do I send an email with attachments?
3.4.2 How do I create an attachment from a stream?
3.5 Accessing Config File Mail Settings Programmatically
3 Quickstart Programming Samples
Printer Friendly
This System.Web.Mail QuickStart is a series of samples and supporting commentary designed to quickly acquaint developers with the syntax of sending email in .NET. The QuickStart samples are designed to be short, easy-to-understand illustrations of System.Net.Mail.
Important: When testing these samples, always be sure to:
1. Have a reference set to the
System.dll
.
2. If you are using C#, be sure the "
using System.Net.Mail;
" statement is found at the top of your code. Or, if you are using VB.NET, be sure the "
Imports System.Net.Mail
" statement if found at the top of your code.
3. Set the correct
FROM
and
TO
addresses.
4. Set the
SmtpMail.SmtpServer to a valid server
that allows relaying for your FROM email address or the IP address you are sending email from.
Hosted by
Copyright © 2004 Contact:
Dave Wanta
.
aspNetEmail
aspNetPOP3
aspNetMime