Пример #1
0
 def email_user(self, subject, message, from_email=None, **kwargs):
     """
     Sends an email to this User.
     """
     if isinstance(message, dict) and 'context' in message and 'template' in message:
         send_templated_email(subject, message['template'], message['context'], self.email, from_email)
     else:
         send_mail(subject, message, from_email, [self.email], **kwargs)
Пример #2
0
    def send(self):
        subject = _("Invitation to V LO graduates community.")
        context = {
            'person': self.person,
            'invited_by': self.invited_by,
            'message': self.message
        }

        send_templated_email(subject, 'community/invite.html', context, [self.email], )
Пример #3
0
 def email_user(self, subject, message, from_email=None, **kwargs):
     """
     Sends an email to this User.
     """
     if isinstance(message,
                   dict) and 'context' in message and 'template' in message:
         send_templated_email(subject, message['template'],
                              message['context'], self.email, from_email)
     else:
         send_mail(subject, message, from_email, [self.email], **kwargs)
Пример #4
0
    def send(self):
        subject = _("Invitation to V LO graduates community.")
        context = {
            'person': self.person,
            'invited_by': self.invited_by,
            'message': self.message
        }

        send_templated_email(
            subject,
            'community/invite.html',
            context,
            [self.email],
        )