예제 #1
0
        public void SendShareMessageEmailOnRegistration(string mail, string templatePath, long userId, int numberOfShipments)
        {
            var mailSender = new MailServiceSendGrid(ConfigSettingsService.Get("NotificationMailSettingsSendGrid"), _logService);
            var model      = new ShareMessageEmail
            {
                Email = mail,
                Link  = FormatUrl("/register?share=" + userId, userId, "findfriend", false, (numberOfShipments == 0 ? null : numberOfShipments.ToString()))
            };
            var subj     = "Одна из ваших подруг зарегистрировалась на KinkyLove";
            var template = mailSender.SendMailUsingTemplateFromFile(mail, subj, model, templatePath);

            MailsLog(template, mail, userId, subj, templatePath);
        }
예제 #2
0
        public void SendShareMessageEmail(string mail, string templatePath, UserViewModel user, int numberOfShipments)
        {
            var mailSender = new MailServiceSendGrid(ConfigSettingsService.Get("NotificationMailSettingsSendGrid"), _logService);
            var model      = new ShareMessageEmail
            {
                User  = user,
                Email = mail,
                Link  = FormatUrl("/register?share=" + user.UserId, user.UserId, "ShareForPremium", false, (numberOfShipments == 0 ? null : numberOfShipments.ToString()))
            };
            var subj     = user.NameFull + " " + MailResources.Sent_you + " " + MailResources.Message;
            var template = mailSender.SendMailUsingTemplateFromFile(mail, subj, model, templatePath, user.Name);

            MailsLog(template, mail, user.UserId, subj, templatePath);
        }