email

how send email in asp.net using c# . i am using that code

Page 1 of 1

1 Replies - 829 Views - Last Post: 06 July 2010 - 08:03 AM Rate Topic: -----

#1 ranarakesh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 06-July 10

email

Posted 06 July 2010 - 02:36 AM

private void btnSend_Click(object sender, System.EventArgs e) 

{                                                 

    MailMessage msg = new MailMessage();
  

    msg.To = txtTo.Text; 

    msg.From = txtFrom.Text; 

    msg.Subject = txtSubject.Text; 

    msg.Body = txtContent.Value;
    lblStatus.Text = "Sending...";
                                              

    SmtpMail.Send(msg); 

    lblStatus.Text = "Sent email (" + txtSubject.Text + ") to " +txtTo.Text;                                          

}


Admin Edit: Please use code tags when posting your code. Code tags are used like so => :code:

Thanks,
PsychoCoder :)

Is This A Good Question/Topic? 0
  • +

Replies To: email

#2 Frinavale  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 203
  • View blog
  • Posts: 776
  • Joined: 03-June 10

Re: email

Posted 06 July 2010 - 08:03 AM

You can't just post a bunch of code and expect us to figure out what it's supposed to do, what you're having problems with, what error messages you're seeing, or what the code isn't doing properly....

Please ask a question and post code for reference purposes.
(Remember to post code in code tags like this: [code] code goes in here[/code])

-Frinny

This post has been edited by Frinavale: 06 July 2010 - 08:04 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1