I am having a webpage in websites which is required to send mail to a particular mail address mentioned in the textbox

Dim msgMail As New MailMessage()
Dim smtpMail As New SmtpClient()
msgMail.To.Add(New MailAddress(your textbox value))
msgMail.From = New MailAddress(set your email or any specific email)
msgMail.Subject = "set your subject line"
msgMail.IsBodyHtml = True
smtpMail.Host = "set your email host address"
smtpMail.Send(msgMail)


I am having a webpage in websites which is required to send mail to a particular mail address mentioned in the textbox

can u plz expalin in more details in more detail...

what you want from me to explain in detail ? I am not getting you clearly.

can u plz expalin in more details in more detail...

i m using c# instead of vb n also......i will really appreciate if u provide an example code for explaination

using System.Net.Mail;

MailMessage msgMail = new MailMessage();
SmtpClient smtpMail = new SmtpClient();
msgMail.To.Add(New MailAddress(here you need to use your textbox.Text));
msgMail.From = New MailAddress(set your email or any specific email);
msgMail.Subject = "set your subject line";
msgMail.IsBodyHtml = True;
smtpMail.Host = "set your email host address";
smtpMail.Send(msgMail);

this is the C# working code. MailMessage is class which is used to construct an email message and send it using smtpclient.
===========================================================================================

i m using c# instead of vb n also......i will really appreciate if u provide an example code for explaination

thanx man...........can u plz help on on my oder poste........thanx:)

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.