Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
Hi all,

I have written C# code for a web application where I can send emails using SMTP server.
How to add multiple attachments and send.
Do I need to use fileupload or is there something other than that?
Please advise

Thank you,
Posted
Updated 1-Feb-13 0:57am
v2

1 solution

Hi all,

I tried with fileUpload and found the solution.

C#
mail.Attachments.Add(new Attachment(fileUpload.PostedFile.InputStream, fileUpload.FileName)); 


Thank you all
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900