hi..
I'm new to asp.net..
can anyone tell me how to send automatic email to subscribed users..
like when the admin posted new things in their website, user should be
notified automatically..
can any one explain me with example coding...
thanks in advance...
Umesh Kumar122 pointsPosted Apr 30, 2014, 5:13 AM EDT
SmtpClient smtpClient = new SmtpClient("mail.MyWebsiteDomainName.com", 25); smtpClient.Credentials = new System.Net.NetworkCredential("[email protected]", "myIDPassword"); smtpClient.UseDefaultCredentials = true; smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; smtpClient.EnableSsl = true; MailMessage mail = new MailMessage(); //Setting From , To and CC mail.From = new MailAddress("info@MyWebsiteDomainName", "MyWeb Site"); mail.To.Add(new MailAddress("info@MyWebsiteDomainName")); mail.CC.Add(new MailAddress("[email protected]")); smtpClient.Send(mail);priyadharshan sekar22 pointsPosted Apr 30, 2014, 5:38 AM EDT