MailAttachment

MailAttachment

System.Web.Mail (system.web.dll)class

This class encapsulates an attachment to an email message. The constructor takes a string argument that identifies the local path to the file, as in MailAttachment(@"c:\temp\report.pdf"). An optional second argument lets you set the encoding (which will be UUEncode if omitted). Once you create an instance of MailAttachment, you can add it to an instance of the MailMessage class with the MailMessage.Attachments collection. The easiest way to do this is through the Add( ) method of the MailMessage.Attachments class, like this: objMessage.Attachments.Add(objAttachment).

public class MailAttachment { // Public Constructors    public MailAttachment(string filename);    public MailAttachment(string filename, MailEncoding encoding); // Public Instance Properties    public MailEncoding Encoding{get; }    public string Filename{get; } }


ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net