protected CustomMailBase(IMailProviderTemplate provider, string fromAddress, string fromAddressPass, string fromDisplayName = null, string subject = null, string body = null) { SMTPClient = provider.SMTPClient; SSLAbilityState = provider.SSLAbilityState; SMTPPort = provider.SMTPPort; Credential = new NetworkCredential(fromAddress, fromAddressPass); FromAddress = new MailAddress(fromAddress, fromDisplayName); if (!string.IsNullOrEmpty(subject)) { MessageSubject = subject; } if (!string.IsNullOrEmpty(body)) { MessageBody = body; } }
public CustomMail(IMailProviderTemplate provider, string fromAddress, string fromAddressPass, string fromDisplayName = null, string subject = null, string body = null) : base(provider, fromAddress, fromAddressPass, fromDisplayName, subject, body) { }