I have a web site http://ssimphal.nic.in Here I want to have a feedback page and I want the comments to go directly in my hotmail email id instead of going to the database. Please help me with the code. I am using Visual Studio . Net. I am writing in VB.

Thanks in advance!

Try this code : Its in C# / Convert it into VB

using System.Net.Mail;

            String strFromAddress ="From@MailAddress.com";
            String strToAddress ="To@MailAddress.com";
            String strSubject = " FeedBack  ";
            String strMessageBody = "";
            String strMailHostIP = "localhost";
            strSubject = "Test ";

            strMessageBody = strMessageBody + " Dear Sir,\n";
            strMessageBody = strMessageBody + " The following user have given Feedback.\n\n";
            strMessageBody = strMessageBody + " Thanks and Regards ";

            MailMessage message = new MailMessage(strFromAddress, strToAddress, strSubject, strMessageBody);
            SmtpClient emailClient = new SmtpClient();
            emailClient.Host = strMailHostIP;

            lblMessage.Text = "Your mail have been successfully sent, we will contact you shortly. " ;
            lblMessage.Visible = true;

        catch (Exception ex)
            lblErr.Text = "Sorry,Your Feedback could not be sent. Please Try Again. ";
            lblErr.Visible = true;

This article has been dead for over six months. Start a new discussion instead.