Exemple #1
0
 /// <summary>
 /// The function is sending an email.
 /// </summary>
 /// <param name="_email">The email address string</param>
 /// <param name="_subj">The email's subject string </param>
 /// <param name="_message">The email's body string </param>
 /// <returns>Return true If Email is enabled</returns>
 public static bool SendEmail(string _email, string _subj, string _message)
 {
     try
     {
         if (((string)GetValueFromConfig("Report.Enabled")).ToLower() == "true")
         {
             _functions _newF = new _functions();
             _newF.email   = _email;
             _newF.subj    = _subj;
             _newF.message = _message;
             Thread _th = new Thread(new ThreadStart(_newF.SendEmailThread));
             _th.Start();
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (ThreadAbortException taex)
     {
         throw new Exception(taex.Message);
     }
 }
Exemple #2
0
 /// <summary>
 /// The function is sending an email.
 /// </summary>
 /// <param name="_email">The email address string</param>
 /// <param name="_subj">The email's subject string </param>
 /// <param name="_message">The email's body string </param>
 /// <returns>Return true If Email is enabled</returns>
 public static bool SendEmail(string _email, string _subj, string _message)
 {
     try
     {
         if(((string)GetValueFromConfig("Report.Enabled")).ToLower() == "true")
         {
             _functions _newF = new _functions();
             _newF.email = _email;
             _newF.subj = _subj;
             _newF.message = _message;
             Thread _th = new Thread(new ThreadStart(_newF.SendEmailThread));
             _th.Start();
             return true;
         }
         else
             return false;
     }
     catch(ThreadAbortException taex)
     {
         throw new Exception(taex.Message, taex);
     }
 }