RSS

Mail send with File Attachment with vb.net

17 May

Uploaded File send  Email with Attachment

just add this code before send method  like

smtpClient.Send(emailMessage)

fu_Resume  the name of Fileupload Control

If Not fu_Resume Is Nothing Then
If fu_Resume.HasFile Then
emailMessage.Attachments.Add(New Attachment(fu_Resume.PostedFile.InputStream, fu_Resume.FileName))
End If
End If

Advertisements
 
Leave a comment

Posted by on May 17, 2011 in Vb.Net

 

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: