hi Surendar, if I undestand correctly, you're storing your agendas in the custom table. If that is the case, then I would use a global object event to sent your emails.
To capture the subscriber emails, you can create a simple form in the Forms application. This form would probably only need to contain the users name and email. When the user submits the form, their details will be stored in teh database. You can also setup Kentico to send a qucik email to them at this point using the Autoresponder to let them know what they've signed up to.
To send the emails when new agendas are create, you could create a new class in App_Code
(or Old_App_Code
if you're running a website project rather than a web application project) that looks similar to the following:
using CMS;
using CMS.DataEngine;
using CMS.EmailEngine;
[assembly: RegisterModule(typeof(CustomTableEventHandler))]
public class CustomTableEventHandler : Module
{
public CustomTableEventHandler() : base("CustomTableEventHandler") { }
protected override void OnInit()
{
// Assigns custom handlers to events
ObjectEvents.Insert.After += Insert_After;
}
private void Insert_After(object sender, ObjectEventArgs e)
{
switch (e.Object.TypeInfo.ObjectType)
{
case "customtableitem.customtable.sampletable":
// Send your emails here...
var email = new EmailMessage();
email.Recipients = "to@foo.com";
email.From = "no-reply@foo.com";
email.Subject = "New meetings agenda";
email.PlainTextBody = "Some nice message";
EmailSender.SendEmail(email);
break;
default:
break;
}
}
}
What next? Well, where the block is that you're sending emails, you can use database queries in the API to pull your list of subscribers from the Form created in order to gather the recispients for the email. To make the emails more manageable, you can then use email templates to format your content.