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)
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], )
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], )