Archive for the Abstract Factory Pattern Category

Hi..see you again.. this section is the continue part of my trilogy Multipurpose of Exception Handling class, okay let’s make it this quickly, the last class that we need is EmailGenerator class :

  • This class using 3 core of .Net library; System IO for accessing the XML email template,System XML and then System.Web.Email.
  • The main idea for this class is service another class that want to generate the email notification so we need to produce the public method for sending the emai, here are the method

public void AutomaticSendEmailLogging(string ErrorMessage)
        {
          
            MailMessage mailMsg = new MailMessage(); // Create instance of EmailMessage Object

            string templateName = FrameworkLayer.ConfigurationUtility.WebApplicationConfiguration.ProgrammerEmailName;
            mailMsg.From = FrameworkLayer.ConfigurationUtility.WebApplicationConfiguration.EmailSender;
            mailMsg.To = FrameworkLayer.ConfigurationUtility.WebApplicationConfiguration.ProgrammerEmail;
            //mailMsg.Cc = EmailUser;

(more…)