Email Templates in eCatalog


Streamlining Communication with Predefined Email Templates:

eCatalog allows programmers to define a range of customizable email templates that can be used throughout the system for various automated communications. This feature ensures consistent messaging and simplifies the management of email content.


Defining Email Templates:


Enumerate Email Templates:


List of Templates: 

Programmers start by defining an enumeration of available email templates. This helps organize and reference the templates systematically within the system.


Example Enumeration:

public enum enumEmailTemplates

    {

        [eCatalogDisplayName("NewClinician_NotifySOM")]

        NewClinician_NotifySOM,

        [eCatalogDisplayName("ScheduleJob_Alert")]

        ScheduleJob_Alert,

        [eCatalogDisplayName("ReportExpiryForDeptSecretaries")]

        ReportExpiryForDeptSecretaries,

..and so on.





Set Default Template Values:


Initialization of Templates: When an email template is registered for the first time, the system requires default values to be set for each template.


public override EmailConfig getDefaultEmailTemplate(string TemplateName)

        {

            #region NewClinician_NotifySOM

            //NewClinician_NotifySOM

            if (TemplateName.ToLower() == getEmailTemplateName(enumEmailTemplates.NewClinician_NotifySOM).ToLower())

            {

                EmailConfig oNew = new EmailConfig();

                oNew.ModuleName = this.ModuleName;

                oNew.EmailName = TemplateName;

                oNew.EmailFrom = "[_ITAdmin.EmailSender_]";

                oNew.EmailFromName = "CLIP";

                oNew.EmailTo = "[_SOMAdmin.Emails_]";

                oNew.EmailCC = "";

                oNew.EmailBCC = "";

                oNew.EmailSubject = "Doctor Registry Shared Drive Access Request";

                oNew.EmailBody = @"Good day! <br />

                            <br />

                            Please grant the doctor shared drive access as per matrix. <br />

                            <br />

                            [_Pages.TaskLink_]

                            <br /><br/>

                            Thank you. <br />

                            <br />";

                oNew.AllowCustomize = false;

                oNew.Enabled = 1;

                return oNew;

            }

            #endregion





Modifying Templates in Settings:

Once registered, administrators can customize these email templates directly from the settings page. This allows for on-the-fly modifications to adjust content according to changing requirements or specific communication strategies.


Customization Options:
Administrators can edit aspects of the email such as the recipient, CC, BCC, subject line, and body content. This flexibility is crucial for ensuring that the communications are relevant and timely.