Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (user.Role.Code == "user") {
- registrationNotificationModel = new RegistrationNotificationEmailModel();
- var newCustomerBase = user.Map<NewCustomerAddedBase>(Mapper);
- newCustomerBase.EmailTo = Settings.Default.AdminEmail; ;
- newCustomerBase.Affiliate.Company = affiliate.Map<CompanyEmailModel>(Mapper);
- newCustomerBase.Domain = gluedDomain;
- var newCustomerAddedNotificationModel = new NewCustomerAddedNotificationEmailModel {
- NewCustomer = newCustomerBase,
- IsUserAdded = false
- };
- BackgroundJob.Enqueue<IEmailService>(es => es.Send(newCustomerAddedNotificationModel));
- }
- else {
- registrationNotificationModel = new AffiliatesSignUpNotificationEmailModel {
- Company = company.Map<CompanyEmailModel>(Mapper)
- };
- var newAffiliateAddedNotify = user.Map<NewAffiliateAddedNotificationEmailModel>(Mapper);
- newAffiliateAddedNotify.EmailTo = "partners@xoutplus.com, sean@xoutplus.com, anthony@xoutplus.com, pavel@xoutplus.com";
- newAffiliateAddedNotify.Domain = gluedDomain;
- BackgroundJob.Enqueue<IEmailService>(es => es.Send(newAffiliateAddedNotify));
- }
- registrationNotificationModel.Password = data.Password;
- registrationNotificationModel.User = Mapper.Map<RegistrationNotificationUserEmailModel>(user);
- registrationNotificationModel.Domain = gluedDomain;
- BackgroundJob.Enqueue<IEmailService>(es => es.Send(registrationNotificationModel));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement