def _make_mail(locale): mail = email_utils.make_mail( subject=subject, text_template=text_template, html_template=html_template, context_vars=email_kwargs, from_email=settings.DEFAULT_FROM_EMAIL, to_email=send_to) return mail
def _make_mail(locale): mail = email_utils.make_mail( subject=subject, text_template=text_template, html_template=html_template, context_vars=c, from_email=from_email, to_email=user.email) return mail
def _make_mail(locale): mail = email_utils.make_mail( subject=subject, text_template='users/email/already_activated.ltxt', html_template='users/email/already_activated.html', context_vars=email_kwargs, from_email=settings.DEFAULT_FROM_EMAIL, to_email=user.email) return mail
def _make_mail(locale): mail = email_utils.make_mail( subject=_('Welcome to SUMO!'), text_template='users/email/contributor.ltxt', html_template='users/email/contributor.html', context_vars={'username': request.user.username}, from_email=settings.DEFAULT_FROM_EMAIL, to_email=request.user.email) return mail
def _make_mail(locale, user, context): subject = _(u'Solution found to Firefox Help question') mail = email_utils.make_mail( subject=subject, text_template='questions/email/solution.ltxt', html_template='questions/email/solution.html', context_vars=context, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email) return mail
def _make_mail(locale, user): subject = _('New announcement for {group}').format( group=group.name) mail = make_mail(subject=subject, text_template=text_template, html_template=html_template, context_vars=email_kwargs, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email) return mail
def _send_mail(locale, user, context): subject = _('Your username on %s') % site_name mail = email_utils.make_mail( subject=subject, text_template=text_template, html_template=html_template, context_vars=context, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email) email_utils.send_messages([mail])
def _make_mail(locale, user): if revision.is_approved: subject = _(u'Your revision has been approved: {title}') else: subject = _(u'Your revision has been reviewed: {title}') subject = subject.format(title=document.title) mail = email_utils.make_mail( subject=subject, text_template='wiki/email/reviewed.ltxt', html_template='wiki/email/reviewed.html', context_vars=c, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email) msgs.append(mail)
def _make_mail(locale): subject = _('Please confirm your email address') context = { 'activation_url': cls._activation_url(watch), 'domain': Site.objects.get_current().domain, 'watch_description': cls.description_of_watch(watch)} mail = email_utils.make_mail( subject=subject, text_template='questions/email/activate_watch.ltxt', html_template='questions/email/activate_watch.html', context_vars=context, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=email) return mail
def _make_mail(locale): subject = _('Please confirm your email address') context = { 'activation_url': cls._activation_url(watch), 'domain': Site.objects.get_current().domain, 'watch_description': cls.description_of_watch(watch) } mail = email_utils.make_mail( subject=subject, text_template='questions/email/activate_watch.ltxt', html_template='questions/email/activate_watch.html', context_vars=context, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=email) return mail
def _make_mail(locale, user, watches): if (is_ready and ReadyRevisionEvent.event_type in (w.event_type for w in watches)): c = context_dict(revision, ready_for_l10n=True) # TODO: Expose all watches c['watch'] = watches[0] c['l10n_url'] = django_reverse('wiki.select_locale', args=[document.slug]) subject = _(u'{title} has a revision ready for ' 'localization') text_template = 'wiki/email/ready_for_l10n.ltxt' html_template = 'wiki/email/ready_for_l10n.html' else: c = context_dict(revision, revision_approved=True) approved_url = reverse('wiki.document', locale=document.locale, args=[document.slug]) c['document_url'] = approved_url # TODO: Expose all watches. c['watch'] = watches[0] c['reviewer'] = revision.reviewer.username subject = _(u'{title} ({locale}) has a new approved ' 'revision ({reviewer})') text_template = 'wiki/email/approved.ltxt' html_template = 'wiki/email/approved.html' subject = subject.format( title=document.title, reviewer=revision.reviewer.username, locale=document.locale) mail = email_utils.make_mail( subject=subject, text_template=text_template, html_template=html_template, context_vars=c, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email) return mail
def _make_mail(locale, user): if revision.is_approved: subject = _(u'A revision you contributed to has ' 'been approved: {title}') else: subject = _(u'A revision you contributed to has ' 'been reviewed: {title}') subject = subject.format(title=document.title) mail = email_utils.make_mail( subject=subject, text_template=text_template, html_template=html_template, context_vars=c, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email) msgs.append(mail)
def _make_mail(locale, user, watches): if (is_ready and ReadyRevisionEvent.event_type in (w.event_type for w in watches)): c = context_dict(revision, ready_for_l10n=True) # TODO: Expose all watches c['watch'] = watches[0] c['l10n_url'] = django_reverse('wiki.select_locale', args=[document.slug]) subject = _(u'{title} has a revision ready for ' 'localization') text_template = 'wiki/email/ready_for_l10n.ltxt' html_template = 'wiki/email/ready_for_l10n.html' else: c = context_dict(revision, revision_approved=True) approved_url = reverse('wiki.document', locale=document.locale, args=[document.slug]) c['document_url'] = approved_url # TODO: Expose all watches. c['watch'] = watches[0] c['reviewer'] = revision.reviewer.username subject = _(u'{title} ({locale}) has a new approved ' 'revision ({reviewer})') text_template = 'wiki/email/approved.ltxt' html_template = 'wiki/email/approved.html' subject = subject.format(title=document.title, reviewer=revision.reviewer.username, locale=document.locale) mail = email_utils.make_mail( subject=subject, text_template=text_template, html_template=html_template, context_vars=c, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email) return mail
def _send_mail(locale): subject = _(u'[SUMO] You have a new private message from [{sender}]') subject = subject.format(sender=inbox_message.sender.username) context = { 'sender': inbox_message.sender.username, 'message': inbox_message.message, 'message_html': inbox_message.content_parsed, 'message_url': reverse('messages.read', kwargs={'msgid': inbox_message.id}), 'unsubscribe_url': reverse('users.edit_settings'), 'host': Site.objects.get_current().domain} mail = make_mail(subject=subject, text_template='messages/email/private_message.ltxt', html_template='messages/email/private_message.html', context_vars=context, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=inbox_message.to.email) send_messages([mail])
def _make_mail(locale, user, context): is_asker = asker_id == user.id if is_asker: subject = _(u'%s posted an answer to your question "%s"' % (self.answer.creator.username, self.instance.title)) text_template = 'questions/email/new_answer_to_asker.ltxt' html_template = 'questions/email/new_answer_to_asker.html' else: subject = _(u'%s commented on a Firefox question ' "you're watching" % self.answer.creator.username) text_template = 'questions/email/new_answer.ltxt' html_template = 'questions/email/new_answer.html' mail = email_utils.make_mail( subject=subject, text_template=text_template, html_template=html_template, context_vars=context, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email) return mail
def _make_mail(locale, user, context): is_asker = asker_id == user.id if is_asker: subject = _( u'%s posted an answer to your question "%s"' % (self.answer.creator.username, self.instance.title)) text_template = 'questions/email/new_answer_to_asker.ltxt' html_template = 'questions/email/new_answer_to_asker.html' else: subject = _(u'%s commented on a Firefox question ' "you're watching" % self.answer.creator.username) text_template = 'questions/email/new_answer.ltxt' html_template = 'questions/email/new_answer.html' mail = email_utils.make_mail( subject=subject, text_template=text_template, html_template=html_template, context_vars=context, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email) return mail