hi friend
pl first of all store the email id of login user at registration time
when a user loged in then u pick the email id from database and
add namespace System.Web.mail;
write this code on the click of that link button
try
{
MailMessage msg = new MailMessage();
msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = "mail.domain.com";
// set SMTP server port
msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = 25;
msg.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2;
msg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1;
// set SMTP username
msg.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "emailid@domain.com";
// set SMTP user password
msg.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "password";
msg.From = "emailid@domain.com";
msg.To = toaddress@domain.com/ textmail.text;
msg.Subject = "Subject";
msg.Body = "body text which u want to send to user login;
SmtpMail.SmtpServer = "mail.domain.com";
SmtpMail.Send(msg);
}
catch (Exception ee)
{
//Response.Write("Server Not Responding");
ee.Message.ToString();
}
finally
{
Literal1.Text = "Request sent to :" + txtmail.Text;
txtmail.Text = "";
}
Abhi_patil, if this helps please login to Mark As Answer. | Alert Moderator