Articles -- Email -- Sending Email with ASP.NET 2.0

The Attachment class is used with the MailMessage class. All messages include a Body, which contains the content of the message. In addition to the body, you might want to send additional files. These are sent as attachments and are represented as Attachment instances. To add an attachment to a mail message, add it to the MailMessage.Attachments collection. Attachment content can be a String, Stream, or file name. You can specify the content in an attachment by using any of the Attachment constructors.

Send email with attachment from file system:

See Also:

Easy way to send email in few lines of code  
Add multiple To, CC, BCC
ReplyTo, Priority (Importance)
Custom Headers, Request a Read Receipt

Working with mail message body format:
Send email in plain text format
Send email in HTML format
Send Multi-Part MIME email
Encode the message body and subject

Send email with attachment:
... from file system
... from a stream
... as embedded external resource

Ask a Question


4AspNet POP3
.NET Component


Join WebHost4Life.com
COPYRIGHT © 2010 WWW.4-ASP.NET ALL RIGHTS RESERVED
Home E-mail Us Add to Favorities (Ctrl+D)