SmtpClient smtpClient = new SmtpClient();
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
try
{
MailAddress fromAddress = new MailAddress("charan@citycinemas.in", "CityCinemas");
smtpClient.Host = "202.0.103.18";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("pavan.it30@gmail.com");
message.Subject = "Ticket Details";
//message.CC.Add("anil.vnkta@gmail.com");
// message.CC.Add("");
// You can specify Address directly as string
// message.Bcc.Add(new MailAddress(""));
//message.Bcc.Add(new MailAddress(""));
message.IsBodyHtml = true;
message.Body = MailBody;
smtpClient.Send(message);
}
catch (Exception ex)
{
}
No comments:
Post a Comment