Results 1 to 16 of 16

Thread: Send email with textbox values

Threaded View

  1. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    268

    Re: Send email with textbox values

    Quote Originally Posted by Fishcake
    Sending email is reasonably easy with asp.net and is well described in this article.

    As for the configuration details of the server you will need those details off someone who administers your SMTP server.
    Hi this is my code,

    is this correct...?

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
    MailMessage mail = new MailMessage();

    mail.To = "[email protected]";

    mail.From = txtemail.Text;

    mail.Subject = txtname.Text;

    mail.Body = txtmessage.Text;

    SmtpMail.SmtpServer = "localhost";

    SmtpMail.Send(mail);

    }

    by checking this i'll have a error on the SmtpMail.Send(mail);

    tel me
    Last edited by mendhak; Jan 6th, 2009 at 06:57 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width