Results 1 to 2 of 2

Thread: Asp.net code for sending mail

  1. #1
    OrtizCooper is offline Banned
    Join Date
    Dec 2009
    Posts
    186
    Rep Power
    0

    Default Asp.net code for sending mail

    Hi. I am new in programming world. I want code for if the users fill the feedback form, then I get the user feedback information via email. If you any proper coded then give me that it is highly appreciated. Thank you.

  2. #2
    CarterWatson is offline Senior Member
    Join Date
    Dec 2009
    Posts
    189
    Rep Power
    3

    Default

    The script that I have mentioned below will definitely help you.

    Code:
    MailMessage objEmail          = new MailMessage();
                objEmail.To       = txtTo.Text;
                objEmail.From     = txtFrom.Text;
                objEmail.Cc       = txtCc.Text;
                objEmail.Subject  = "Test Email";
                objEmail.Body     = txtName.Text + ", " +
                                    txtComments.Text;
                objEmail.Priority = MailPriority.High;
      //SmtpMail.SmtpServer = "localhost";
      try{
        SmtpMail.Send(objEmail);
        Response.Write("Your Email has been sent sucessfully -
                        Thank You");
      }
      catch (Exception exc){
        Response.Write("Send failure: " + exc.ToString());
      }

Similar Threads

  1. Problem sending e-mail
    By Dagobert Oskar in forum Web. 2.0
    Replies: 0
    Last Post: 10-16-2010, 07:36 AM
  2. Asp.net code for sending sms
    By MyersGray in forum Programming
    Replies: 2
    Last Post: 07-23-2010, 03:41 PM
  3. php code for sending mail with attachment
    By Davisricky in forum Programming
    Replies: 2
    Last Post: 07-13-2010, 02:52 PM
  4. Html code for sending SMS
    By Brownchris in forum General Internet Terms
    Replies: 1
    Last Post: 07-13-2010, 02:47 PM
  5. Mail sending formats
    By Newtech32 in forum General Internet Terms
    Replies: 0
    Last Post: 03-31-2008, 10:04 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48