public CreateIdentityCommand(Model.Identity identity, Officer user, ISmtpProvider smtpProvider) { _user = user; _identity = identity; _smtpProvider = smtpProvider; }
public CaseService(IDbConnectionProvider connectionProvider, IEventBus eventBus , ISmtpProvider smtpProvider) : base(connectionProvider) { _eventBus = eventBus; _smtpProvider = smtpProvider; }
public OnShowCauseLetterCommand(Letter letter, long caseID, Officer user, ISmtpProvider smtpProvider) { _letter = letter; _caseID = caseID; _user = user; _smtpProvider = smtpProvider; }
public CertificateExpiryCheckJob(IHttpSysConfigurationProvider httpSysConfigProvider, ILogger <CertificateExpiryCheckJob> logger, IRegistryProvider registryProvider, ISmtpProvider smtpProvider, IOptionsMonitor <AdminNotificationOptions> emailOptions) { this.httpSysConfigProvider = httpSysConfigProvider; this.logger = logger; this.registryProvider = registryProvider; this.smtpProvider = smtpProvider; this.adminNotificationOptions = emailOptions; }
public SmtpNotificationChannel(ILogger <SmtpNotificationChannel> logger, ITemplateProvider templates, IOptionsSnapshot <AuditOptions> auditSettings, ChannelWriter <Action> queue, ISmtpProvider smtpProvider) : base(logger, queue) { this.logger = logger; this.templates = templates; this.NotificationChannelDefinitions = auditSettings.Value.NotificationChannels.Smtp; this.smtpProvider = smtpProvider; }
public EmailNotificationProvider(ISmtpProvider smtpProvider, ILogger <EmailNotificationProvider> logger, IEmailQueue emailQueue) { _smtpProvider = smtpProvider; _emailQueue = emailQueue; _logger = logger; }
public NewVersionCheckJob(IApplicationUpgradeProvider appUpgradeProvider, ILogger <NewVersionCheckJob> logger, ISmtpProvider smtpProvider, IOptionsMonitor <AdminNotificationOptions> adminNotificationOptions, IRegistryProvider registryProvider) { this.appUpgradeProvider = appUpgradeProvider; this.logger = logger; this.registryProvider = registryProvider; this.smtpProvider = smtpProvider; this.adminNotificationOptions = adminNotificationOptions; }
public ForgotPasswordCommand(string email, ICacheProvider cacheProvider, ISmtpProvider smtpProvider) { _email = email; _cacheProvider = cacheProvider; _smtpProvider = smtpProvider; }
public TextMessage(string source, string phone, string message, IGatewayResolverAsync resolverAsync, ISmtpProvider provider) { Phone = phone; Message = message; this.provider = provider; this.resolverAsync = resolverAsync; CheckState(); }
public JobOrderService(IDbConnectionProvider connectionProvider, IEventBus eventBus, IEmailService emailService, ISmtpProvider smtpProvider) : base(connectionProvider) { _eventBus = eventBus; _emailService = emailService; _smtpProvider = smtpProvider; }
public ResetPasswordCommand(Guid id, Officer user, ICacheProvider cacheProvider, ISmtpProvider smtpProvider) { _id = id; _user = user; _cacheProvider = cacheProvider; _smtpProvider = smtpProvider; }
public IdentityService(IDbConnectionProvider connectionProvider, ICacheProvider cacheProvider, ISmtpProvider smtpProvider, IEventBus eventBus) : base(connectionProvider) { _cacheProvider = cacheProvider; _smtpProvider = smtpProvider; _eventBus = eventBus; }
public TextMessage(string source, string phone, string message, IGatewayResolver resolver, ISmtpProvider provider) { Message = message; Phone = phone; Source = source; this.provider = provider; this.resolver = resolver; CheckState(); }
public ApproveRequestCommand(IList <Review> reviews, IEventBus eventBus, IEmailService emailService, ISmtpProvider smtpProvider) { _reviews = reviews; _emailService = emailService; _eventBus = eventBus; _smtpProvider = smtpProvider; }
public CreateJobOrderCommand(ScheduleJobOrderParam param, Guid userID, string userName, string userEmail, IEventBus eventBus, IEmailService emailService, ISmtpProvider smtpProvider) { _param = param; _userID = userID; _userName = userName; _userEmail = userEmail; _eventBus = eventBus; _emailService = emailService; _smtpProvider = smtpProvider; }
public RescheduleJobOrderCommand(long id, RescheduleParam param, Officer user, IEventBus eventBus, IEmailService emailService, ISmtpProvider smtpProvider) { _id = id; _param = param; _user = user; _eventBus = eventBus; _emailService = emailService; _smtpProvider = smtpProvider; }
private static MimeMessage BuildMimeMessage(ISmtpProvider smtp, MailMessage mail) { var mimeMessage = new MimeMessage(); mimeMessage.From.Add(new MailboxAddress(smtp.SenderDisplayName, smtp.SenderMailAddress ?? smtp.CredentialName)); mimeMessage.To.AddRange(mail.To.Select(to => new MailboxAddress(to.Name, to.Address))); mimeMessage.Cc.AddRange(mail.Cc.Select(cc => new MailboxAddress(cc.Name, cc.Address))); mimeMessage.Subject = mail.Subject; var body = new TextPart(mail.IsHtml ? TextFormat.Html : TextFormat.Text) { Text = mail.Body }; if (mail.Attachments.Count == 0) { mimeMessage.Body = body; } else { var multipart = new Multipart("mixed"); mail.Attachments.AsParallel().ForAll(x => { multipart.Add(new MimePart(x.ContentType) { FileName = x.Name, Content = new MimeContent(x.ContentStream), ContentDisposition = new ContentDisposition(ContentDisposition.Attachment), ContentTransferEncoding = ContentEncoding.Base64 }); }); multipart.Add(body); mimeMessage.Body = multipart; } return(mimeMessage); }
public void SendTestEmailReport() { // check... if (!(this.IsEmailReportingProperlyConfigured)) { throw new InvalidOperationException("E-mail reporting is not properly configured."); } // get... ISmtpProvider provider = MailProviderFactory.GetSmtpProvider(); provider.Settings = new SmtpConnectionSettings(this.EmailReportingHostName, this.EmailReportingUsername, this.EmailReportingPassword); // send... MailMessage message = new MailMessage(); message.FromAsString = this.EmailReportingFrom; message.ToAsString = this.EmailReportingTo; message.Subject = string.Format("E-mail Error Reporting Test - {0} - {1}", Runtime.Current.Application.ProductCompany, Runtime.Current.Application.ProductName); message.Body = "This is a test message from E-mail Error Reporting."; // send... provider.Send(message); }
public EmailNotifier(IEmailSettings settings, ISmtpProvider smtpProvider, ILogger logger) { _settings = settings; _smtpProvider = smtpProvider; _logger = logger; }
public RazorEmailNotificationProvider(IViewRenderService viewRenderService, ISmtpProvider smtpProvider, ILogger <EmailNotificationProvider> logger, IEmailQueue emailQueue) : base(smtpProvider, logger, emailQueue) { _viewRenderService = viewRenderService; }
public EmailNotifyService(ISmtpProvider smtpProvider, ILogger <EmailNotifyService> logger) { _smtpProvider = smtpProvider; _logger = logger; }
public MailSender(IMailDbContext mailDb, ISmtpProvider givenSmtp) { _mailDb = mailDb; _smtp = givenSmtp; }
public RazorEmailNotifyService(IViewRenderService viewRenderService, ISmtpProvider smtpProvider, ILogger <EmailNotifyService> logger) : base(smtpProvider, logger) { _viewRenderService = viewRenderService; }
/// <summary> /// Configures and sends a message via SMTP. /// </summary> /// <param name="from"></param> /// <param name="to"></param> /// <param name="cc"></param> /// <param name="bcc"></param> /// <param name="subject"></param> /// <param name="body"></param> /// <param name="format"></param> public static void SendViaSmtp(MailMessageRecipient from, MailMessageRecipientCollection to, MailMessageRecipientCollection cc, MailMessageRecipientCollection bcc, string subject, string body, MailFormat format, SmtpConnectionSettings settings) { if (from == null) { throw new ArgumentNullException("from"); } // anyone? int total = 0; if (to != null) { total += to.Count; } if (cc != null) { total += cc.Count; } if (bcc != null) { total += bcc.Count; } // throw? if (total == 0) { throw new InvalidOperationException("You must specify at least one person to send the message to."); } // create... MailMessage message = new MailMessage(); message.From = from; message.To.Clear(); if (to != null) { message.To.AddRange(to); } message.Cc.Clear(); if (cc != null) { message.Cc.AddRange(cc); } message.Bcc.Clear(); if (bcc != null) { message.Bcc.AddRange(bcc); } message.Subject = subject; message.Body = body; message.MailFormat = format; // send... ISmtpProvider provider = GetSmtpProvider(); if (provider == null) { throw new InvalidOperationException("provider is null."); } // set... provider.Settings = settings; // run... provider.Send(message); }
public MessageController(ISmtpProvider smtpProvider) { _smtpProvider = smtpProvider; }