Skip to content

How to send automatic notification to email subscribers

priyadharshan sekar

Asked Apr 30, 2014, 4:06 AM EDT2 answers
Share
LinkedInX
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...

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Umesh Kumar
    0
    What my advise  is that write a winservice whichlooks for the table whether a new dat(a new news has arrived) the using following code to send the mail

    SQL
    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);
    0
  • 0
    how to create the windows services  which looks for the table automatically whether a new data has arrived or not?
    0