コード例 #1
0
ファイル: CommonEmail.cs プロジェクト: heinschulie/z2z
 /// <summary>
 /// Sends an Email Message as a meeting request.
 /// </summary>
 /// <param name="aEmailHost">A email host.</param>
 /// <param name="aEmailArgument">A email argument.</param>
 public static void SendMeetingRequest(EmailHost aEmailHost, EmailArgument aEmailArgument)
 {
     try
     {
         using (var vMailMessage = GetMeetingRequest(aEmailArgument))
         {
             SendMail(aEmailHost, vMailMessage);
         }
     }
     catch (Exception ex)
     {
         throw new ZpCodedException(SourceAssembly.Common, ex.Message, "SendEmailException", "SendMeetingRequest", "Email", ex.InnerException);
     }
 }
コード例 #2
0
 /// <summary>
 /// Sends an Email Message as a meeting request.
 /// </summary>
 /// <param name="aEmailHost">A email host.</param>
 /// <param name="aEmailArgument">A email argument.</param>
 public static void SendMeetingRequest(EmailHost aEmailHost, EmailArgument aEmailArgument)
 {
     try
     {
         using (var vMailMessage = GetMeetingRequest(aEmailArgument))
         {
             SendMail(aEmailHost, vMailMessage);
         }
     }
     catch (Exception ex)
     {
         throw new ZpCodedException(SourceAssembly.Common, ex.Message, "SendEmailException", "SendMeetingRequest", "Email", ex.InnerException);
     }
 }
コード例 #3
0
 /// <summary>
 /// Sends the mail message via the host.
 /// </summary>
 /// <param name="aEmailHost">A email host.</param>
 /// <param name="aMailMessage">A mail message.</param>
 private static void SendMail(EmailHost aEmailHost, MailMessage aMailMessage)
 {
     using (var smtpClient = new SmtpClient()
     {
         Host = aEmailHost.Name,
         Port = aEmailHost.Port,
         EnableSsl = aEmailHost.EnableSsl,
         DeliveryMethod = SmtpDeliveryMethod.Network,
         UseDefaultCredentials = aEmailHost.UseDefaultCredentials,
         Credentials = new NetworkCredential(aEmailHost.UserID, aEmailHost.Password)
     })
     {
         smtpClient.Send(aMailMessage);
     }
 }
コード例 #4
0
ファイル: CommonEmail.cs プロジェクト: heinschulie/z2z
 /// <summary>
 /// Sends the mail message via the host.
 /// </summary>
 /// <param name="aEmailHost">A email host.</param>
 /// <param name="aMailMessage">A mail message.</param>
 private static void SendMail(EmailHost aEmailHost, MailMessage aMailMessage)
 {
     using (var smtpClient = new SmtpClient()
     {
         Host = aEmailHost.Name,
         Port = aEmailHost.Port,
         EnableSsl = aEmailHost.EnableSsl,
         DeliveryMethod = SmtpDeliveryMethod.Network,
         UseDefaultCredentials = aEmailHost.UseDefaultCredentials,
         Credentials = new NetworkCredential(aEmailHost.UserID, aEmailHost.Password)
     })
     {
         smtpClient.Send(aMailMessage);
     }
 }