Пример #1
0
 /// <summary>
 /// Sends the mail message.
 /// </summary>
 /// <param name="message"></param>
 /// <returns></returns>
 public bool Send(NotificationMessage message)
 {
     MailMessage mailMessage = new MailMessage(_config.From, message.To, message.Subject, message.Body);
     mailMessage.IsBodyHtml = message.IsHtml;
     return InternalSend(mailMessage, Settings.IsAuthenticationRequired, Settings.AuthenticationUserName, Settings.AuthenticationPassword);
 }
Пример #2
0
 /// <summary>
 /// Sends the message using the credentials and host/port supplied.
 /// </summary>
 /// <param name="message"></param>
 /// <param name="useCredentials"></param>
 /// <param name="credentialsUser"></param>
 /// <param name="credentialsPassword"></param>
 /// <param name="host"></param>
 /// <param name="port"></param>
 /// <returns></returns>
 //public BoolMessageEx Send(EmailMessage message, bool useCredentials, string credentialsUser, string credentialsPassword, string host, int port)
 //{
 //    MailMessage mailMessage = new MailMessage(message.From, message.To, message.Subject, message.Body);
 //    mailMessage.IsBodyHtml = message.IsHtml;
 //    return InternalSendAndGetResult(mailMessage, useCredentials, credentialsUser, credentialsPassword, host, port);
 //}
 /// <summary>
 /// Sends the specified message.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="credentialsUser">The credentials user.</param>
 /// <param name="credentialsPassword">The credentials password.</param>
 /// <returns></returns>
 public bool Send(NotificationMessage message, string credentialsUser, string credentialsPassword)
 {
     MailMessage mailMessage = new MailMessage(_config.From, message.To, message.Subject, message.Body);
     mailMessage.IsBodyHtml = message.IsHtml;
     return InternalSend(mailMessage, true, credentialsUser, credentialsPassword);
 }