Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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):
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=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=_('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):
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, 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):
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):
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)