Created
February 24, 2012 05:39
-
-
Save timothyclifford/1898055 to your computer and use it in GitHub Desktop.
.net email attachment from posted file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string fileName = Path.GetFileName(UploadedFile.PostedFile.FileName); | |
Attachment attachment = new Attachment(UploadedFile.FileContent, fileName); | |
myMailMessage.Attachments.Add(attachment); | |
SmtpClient mySmtpClient = new SmtpClient(); | |
mySmtpClient.Send(myMailMessage); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment