put 3 text box , one for topic(subject), two for user`s email(from), three for description(body)
in code behind:
using System;
using System.Web.Mail;
in the button:
protected void btn_send_Click(object sender, EventArgs e)
{
string smtpServer = "mail.mahsakashi.com";
string userName = "info@mahsakashi.com";
string password = "123";
int cdoBasic = 1;
int cdoSendUsingPort = 2;
MailMessage msg = new MailMessage();
if (userName.Length > 0)
{
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", smtpServer);
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25);
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", cdoSendUsingPort);
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", cdoBasic);
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", userName);
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password);
}
msg.To = "kashi_mahsa@yahoo.com";
msg.From = "info@mahsakashi.com";
msg.Subject = "Subject";
msg.Body = "Message";
SmtpMail.SmtpServer = smtpServer;
SmtpMail.Send(msg);
}