Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Sending the information in Email ID

Sending the information in Email ID

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NET India
    wrote on last edited by
    #1

    Hello Everyone, Can anybody let me know that wht should i need to do. Actually i've designed a site and there is "Contact" form in my site but i'm not getting the way to where to store the information filled by a user through my "Contact" form If i should use email to send the information at a email-id Then plz let me know how to send email in ASP.NET with c# Thnx in advance

    A 1 Reply Last reply
    0
    • N NET India

      Hello Everyone, Can anybody let me know that wht should i need to do. Actually i've designed a site and there is "Contact" form in my site but i'm not getting the way to where to store the information filled by a user through my "Contact" form If i should use email to send the information at a email-id Then plz let me know how to send email in ASP.NET with c# Thnx in advance

      A Offline
      A Offline
      Ajai Chaudhary
      wrote on last edited by
      #2

      Hi Dear To store values you can use the Database Connectivity the value will stored into sql or access database and to send mail to user you can use theh following code: - 1. To use it you have to import System.Net & System.Net.Mail namespaces. 2. You need to copy the following into web.config file before closing of configuration tag. 3. Use this code in your web page to send the mail to any id. MailMessage mail1 = new MailMessage(); mail1.From = new MailAddress(""); try { mail1.To.Add(); } catch (Exception mailex) { Response.Write("Email id is not in valid form"); Response.Write(mailex.ToString()); } mail1.Subject = "", ""); try { smtp.Send(mail1); } catch (Exception ex) { Response.Write("Failed to send the mail"); Response.Write(ex.ToString()); } With Regards Yogesh Agarwal

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups