Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Apr 2010
    Posts
    216
    Thanks
    116
    Thanked 1 Time in 1 Post

    Upload files in contact form.

    I have a basic .aspx form that sends an email to us once submitted (no database).

    How difficult would it be to give the user a upload image ability on this form, and then have the image sent in the email as an attachment?

    Thanks!
    J

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Ohh right, you wanted to just do it as an attachment. Sorry I thought you wanted to embed the image into the email itself. OK, so you will defintely need to add a fileuploadcontrol and process it in your code behind to handle the file.

    Ok, I found a much better tutorial that applies,

    http://www.codeproject.com/Articles/...-NET-using-SMT

  • #3
    New to the CF scene
    Join Date
    Mar 2013
    Location
    India
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i have no idea about this topic so please explain any one have an idea

  • #4
    Regular Coder
    Join Date
    May 2012
    Location
    USA
    Posts
    102
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Regarding Uploading Files

    Below I have mentioned a link that will help you in embedding an image in mail body and send it to the recipient. http://code.msdn.microsoft.com/CSSMTPSendEmail-c241f55d

  • #5
    New Coder
    Join Date
    Jul 2012
    Location
    Bug Tracking, Isssue Tracking
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would recommend this tutorial for using ASP.net file upload control
    http://www.tutorialspoint.com/asp.ne..._uploading.htm

  • #6
    Regular Coder
    Join Date
    May 2012
    Location
    USA
    Posts
    102
    Thanks
    0
    Thanked 7 Times in 7 Posts
    I checked your code and it looks fine, but is it possible to upload more than one file using this code ?

  • #7
    Regular Coder
    Join Date
    May 2012
    Location
    USA
    Posts
    102
    Thanks
    0
    Thanked 7 Times in 7 Posts
    The link that I shared earlier provides the solution to upload more than one image in your email message.

  • #8
    Regular Coder
    Join Date
    May 2012
    Location
    USA
    Posts
    102
    Thanks
    0
    Thanked 7 Times in 7 Posts
    The link that I shared earlier provides the solution to upload more than one image in your email message.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •