def _send_mail(self, reciever, subject, template, context): if 'url' not in context.keys(): context['url'] = settings.BASE_URL if not reciever: return mail = MailSender(reciever) mail.compose(subject, template, context) mail.send_async()
def send_remider_notification(self): url = settings.BASE_URL if not self.user: return context = {'task': self, 'url': url} mail = MailSender(self.user) mail.compose('[Reminder] ' + self.title, 'tasks/email/notify_reminder', context) mail.send_async()
def send_review_notification(self): url = settings.BASE_URL + 'admin/tasks/task/%s/' % self.id if not self.project.owner: return context = {'task': self, 'url': url} mail = MailSender(self.project.owner) mail.compose('[Review] ' + self.title, 'tasks/email/notify_review', context) mail.send_async()
def send_notification_assigned(self): url = settings.BASE_URL if not self.user: return context = {'task': self, 'url': url} mail = MailSender(self.user) mail.compose('[Assigned] ' + self.title, 'tasks/email/notify_task', context) mail.send_async()
def send(self): user = self.user context = { 'user': user, 'reset_url': full_reverse_url( 'password_reset', kwargs={'id': user.id, 'key': self.key}) } mail = MailSender(user) mail.compose('Password Rest', 'emails/password', context) mail.send_async()
def send_mail(self): """ send mail to all users in the project on new feed """ user = User(email="*****@*****.**") if self.title: title = self.title else: title = "New Article" mail = MailSender(user) mail.compose('[Info] ' + " " + title, 'knowledge/email/article-feed', {'article': self}) mail.send_async()
def send(self): user = self.email_address.user context = { 'email': self.email_address.email, 'key': self.key, 'user': user, 'confirm_url': full_reverse_url('email_confirm', kwargs={'id': user.id, 'key': self.key}), } mail = MailSender(user) mail.compose('Confirmation of your account creation and Next steps', 'emails/confirm', context) mail.send_async() return
def send(self): user = self.email_address.user context = { 'email': self.email_address.email, 'key': self.key, 'user': user, 'confirm_url': full_reverse_url( 'email_confirm', kwargs={'id': user.id, 'key': self.key}), } mail = MailSender(user) mail.compose('Confirmation of your account creation and Next steps', 'emails/confirm', context) mail.send_async() return