예제 #1
0
파일: tasks.py 프로젝트: Navajyoth/proman
 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()
예제 #2
0
 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()
예제 #3
0
 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()
예제 #4
0
 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()
예제 #5
0
파일: models.py 프로젝트: anoop-rdt/Bliss
 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()
예제 #6
0
파일: models.py 프로젝트: Navajyoth/proman
 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()
예제 #7
0
파일: models.py 프로젝트: anoop-rdt/Bliss
 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
예제 #8
0
 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()
예제 #9
0
 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