hi Friends
i try this code but not able to get mail
please through this send me u r valuable thoughts
MailMessage mailMessage=new MailMessage();
mailMessage.From = "[email protected]";
mailMessage.To="[email protected]";
mailMessage.Cc = "[email protected]";
mailMessage.Bcc = "[email protected]";
mailMessage.Subject = "this test mail";
mailMessage.BodyFormat = MailFormat.Text;
mailMessage.Body = "sample mail";
mailMessage.Priority = MailPriority.Normal;
SmtpMail.SmtpServer = "mail.ajel.com";
SmtpMail.Send(mailMessage);
lblValidate.Visible = true;
lblValidate.Text = "successfully subscribed.";
Loading


VulpesRank #55 · 29.2K reputationPosted Oct 12, 2011, 4:43 AM EDT
http://www.systemnetmail.com/
Satyapriya NayakRank #47 · 31.5K reputationPosted Oct 12, 2011, 10:18 AM EDT
Refer the below link
http://www.c-sharpcorner.com/UploadFile/prathore/2464/
Thanks
Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 12, 2011, 10:26 AM EDT
try this, it is working on my machine:
private string SendMessage(string mFrom, string mTo, string mCC, string mSubject, string mBody)
{
string RetMsg = string.Empty;
MailMessage mail = new MailMessage();
mail.From = new MailAddress(mFrom);
mail.To.Add(mTo);
mail.CC.Add(new MailAddress(cc));
mail.Subject = mSubject;
mail.Body = mBody;
SmtpClient smtp = new SmtpClient("server address");
try {
AddMsg("Sending Email now...");
smtp.Send(mail);
AddMsg("Sending Sent");
} catch (Exception ex) {
RetMsg = ex.Message;
}
return RetMsg;
}
Please do not forget to mark "Accepted Answer".