)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Mail (Ia.Ftn.Cl.Models.Ui)

Public general use code classes and xml files that we've compiled and used over the years:

Mail process support class of Fixed Telecommunications Network (FTN) UI model.

    1: using System;
    2:  
    3: namespace Ia.Ftn.Cl.Models.Ui
    4: {
    5:     ////////////////////////////////////////////////////////////////////////////
    6:  
    7:     /// <summary publish="true">
    8:     /// Mail process support class of Fixed Telecommunications Network (FTN) UI model.
    9:     /// </summary>
   10:     /// 
   11:     /// <remarks> 
   12:     /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   13:     /// </remarks> 
   14:     public class Mail
   15:     {
   16:         ////////////////////////////////////////////////////////////////////////////
   17:  
   18:         /// <summary>
   19:         ///
   20:         /// </summary>
   21:         public Mail()
   22:         {
   23:         }
   24:  
   25:         /////////////////////////////////////////////////////////////////////////////////
   26:  
   27:         /// <summary>
   28:         ///
   29:         /// </summary>
   30:         public static void Test(Ia.Ftn.Cl.Models.Business.Administration.StaffContact staffContact, string subject, string bodyText, out string responseSubject, out string responseContent)
   31:         {
   32:             var now = DateTime.UtcNow.AddHours(3);
   33:  
   34:             responseSubject = "Test (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
   35:  
   36:             responseContent = "Test: Daily Fixed Telecommunications Network FTN Status Report: " + now.ToString("yyyy-MM-dd HH:mm") + "\r\n"
   37:                 + "Status: undefined.\r\n"
   38:                 + @"For help send ""help"" in a response email." + "\r\n";
   39:         }
   40:  
   41:         /////////////////////////////////////////////////////////////////////////////////
   42:  
   43:         /// <summary>
   44:         ///
   45:         /// </summary>
   46:         public static Ia.Cl.Models.Result SendPlainMail(string name, string email, string subject, string content)
   47:         {
   48:             var message = Ia.Ftn.Cl.Models.Ui.Default.PlainMailTop();
   49:  
   50:             message += content;
   51:  
   52:             message += Ia.Ftn.Cl.Models.Ui.Default.PlainMailBottom();
   53:  
   54:             return Ia.Cl.Models.Smtp.SendPlain(name, email, subject, message);
   55:         }
   56:  
   57:         /////////////////////////////////////////////////////////////////////////////////
   58:  
   59:         /// <summary>
   60:         ///
   61:         /// </summary>
   62:         public static Ia.Cl.Models.Result SendMail(string name, string email, string subject, string content)
   63:         {
   64:             var message = Ia.Ftn.Cl.Models.Ui.Default.MailTop();
   65:  
   66:             message += content;
   67:  
   68:             message += Ia.Ftn.Cl.Models.Ui.Default.MailBottom();
   69:  
   70:  
   71:             return Ia.Cl.Models.Smtp.SendHtml(name, email, subject, message);
   72:         }
   73:  
   74:         ////////////////////////////////////////////////////////////////////////////
   75:         ////////////////////////////////////////////////////////////////////////////
   76:     }
   77:  
   78:     ////////////////////////////////////////////////////////////////////////////
   79:     ////////////////////////////////////////////////////////////////////////////
   80: }