How do I send an email with attachments

Platform: ASP.NET| Category: Mail

VB.NET


Dim mailattach As New MailAttachment(Server.MapPath('<yourfilename>'))
mail.Attachments.Add(mailattach)

C#


MailAttachment mailattach = new MailAttachment( Server.MapPath( '<yourfilename>' ) );  
mail.Attachments.Add( mailattach );	

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.