本文整理汇总了C#中IEmailSender类的典型用法代码示例。如果您正苦于以下问题:C# IEmailSender类的具体用法?C# IEmailSender怎么用?C# IEmailSender使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IEmailSender类属于命名空间,在下文中一共展示了IEmailSender类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendTaskAssignedEmail
public static void SendTaskAssignedEmail(TaskAssignedEmailViewModel viewModel, IEmailSender emailSender, bool isActionTask = false)
{
var email = (isActionTask) ?
new MailerController().ActionTaskAssigned(viewModel) :
new MailerController().TaskAssigned(viewModel);
emailSender.Send(email);
}
示例2: EmailTemplate
public EmailTemplate(IEmailSender emailSender, ITemplateEngine templateEngine, string from)
{
this.emailSender = emailSender;
this.templateEngine = templateEngine;
this.From = from;
}
示例3: QueuedMessagesSendTask
public QueuedMessagesSendTask(IQueuedEmailService queuedEmailService,
IEmailSender emailSender, ILogger logger)
{
this._queuedEmailService = queuedEmailService;
this._emailSender = emailSender;
this._logger = logger;
}
示例4: PasswordRecoveryByRecoveryClue
public PasswordRecoveryByRecoveryClue(IEmailSender eMailSender, ISystemContext systemContext, ICryptoProvider cryptoProvider, IConfigurationProvider configProvider)
{
this.eMailSender = eMailSender;
this.systemContext = systemContext;
this.cryptoProvider = cryptoProvider;
this.configProvider = configProvider;
}
示例5: UserService
public UserService(IRepository<PersonalInformation, long> personalInfo, IEmailSender emailSender, IAsyncRunner iAsyhcRunner, HttpContextBase httpContextBase)
{
this._personalInformation = personalInfo;
this._EmailSender = emailSender;
this._IAsyncRunner = iAsyhcRunner;
this._IHttpContextBase = httpContextBase;
}
示例6: SendQueuedMessagesTask
public SendQueuedMessagesTask(ISession session, IEmailSender emailSender, SiteSettings siteSettings,Site site)
{
_session = session;
_emailSender = emailSender;
_siteSettings = siteSettings;
_site = site;
}
示例7: SendInvitation
//Add an entry in the ACL, and send an invitation email
public void SendInvitation(string email, Guid ProjectID, UserType userType, IEmailSender emailSender)
{
//Database access
var db = new ApplicationDBContext();
//make sure this isnt a duplicate
if (db.UsersAccessProjects.Where(acl => acl.Email == email && acl.ProjectID == ProjectID).Count() == 0)
{
//Working with ACL
var acl = new UsersAccessProjects();
acl.Email = email;
acl.invitationAccepted = false;
acl.ProjectID = ProjectID;
acl.UserID = null;
//Save the ACL entry
db.UsersAccessProjects.Add(acl);
db.SaveChanges();
//build an invitaion email
string body;
body = "You have been invited to a new project.\n";
body += "Click the link to accept the invitation.\n";
body += "http://northcarolinataxrecoverycalculator.apphb.com/Project/AcceptInvite/" + acl.ID;
//send an invitaion email
emailSender.SendMail(email, "You have been invited to a project", body);
}
}
示例8: OrderProcessor
public OrderProcessor(IUnitOfWork unitOfWork, IEmailSender emailSender, IEmailGenerator emailGenerator, ITotalPriceCalculator totalPriceCalculator)
{
_unitOfWork = unitOfWork;
_emailSender = emailSender;
_emailGenerator = emailGenerator;
_totalPriceCalculator = totalPriceCalculator;
}
示例9: UserController
public UserController(SignInManager<ChirpUser> a_signInManager, UserManager<ChirpUser> a_userManager, ILogger<UserController> a_logger, IEmailSender a_emailSender)
{
m_signInManager = a_signInManager;
m_userManager = a_userManager;
m_logger = a_logger;
m_emailSender = a_emailSender;
}
示例10: SimpleNewsletterService
public SimpleNewsletterService(Type sometype, IEmailSender sender, ITemplateEngine templateEngine)
{
if (sometype == null) throw new ArgumentNullException("sometype");
_sender = sender;
_templateEngine = templateEngine;
}
示例11: SiteController
public SiteController(UserManager<ApplicationUser> userManager, IEmailSender emailSender, IAllReadyDataAccess dataAccess, ILogger<SiteController> logger)
{
_userManager = userManager;
_emailSender = emailSender;
_dataAccess = dataAccess;
_logger = logger;
}
示例12: PasswordRecoveryByResetLink
public PasswordRecoveryByResetLink(IAccountContext accountContext, IEmailSender eMailSender, ISystemContext systemContext, IConfigurationProvider configProvider)
{
this.accountContext = accountContext;
this.eMailSender = eMailSender;
this.systemContext = systemContext;
this.configProvider = configProvider;
}
示例13: AccountService
public AccountService(IMapper mapper, IEmailSender messageService, IHttpContextAccessor accessor, IUserRepository userRepository)
{
_mapper = mapper;
_messageService = messageService;
_accessor = accessor;
_userRepository = userRepository;
}
示例14: UserEmailer
public UserEmailer(IEmailTemplateProvider emailTemplateProvider, IEmailSender emailSender, IWebUrlService webUrlService, IRepository<Tenant> tenantRepository)
{
_emailTemplateProvider = emailTemplateProvider;
_emailSender = emailSender;
_webUrlService = webUrlService;
_tenantRepository = tenantRepository;
}
示例15: UserService
public UserService(IUserRepository userRepository, ICountryRepository countryRepository,
IEmailSender emailSender, ISmsSender smsSender)
{
this.userRepository = userRepository;
this.countryRepository = countryRepository;
this.emailSender = emailSender;
this.smsSender = smsSender;
}