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;

 try
        {
            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;
            emailClient.Send(message);


            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;

        }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.