Home » FAQ » ASP.NET » Mail » How do I send an email with attachments
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 );
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with