def send_shared_link_registration_email(request, profile): "Let sharer know someone registered through their link." sharer_id = request.session.get(SHARED_BY_PROFILE_ID_KEY) if sharer_id: # Sharer_id shouldn't go into session unless it's a valid ID, so no # need to catch invalid ID. sharer = Profile.objects.get(pk=sharer_id) subject = "%s registered on Villages using your shared link" % profile send_mail_from_system( subject, sharer, 'shared_link_registration_email.txt', {'profile': profile})
def send_shared_link_registration_email(request, profile): "Let sharer know someone registered through their link." sharer_id = request.session.get(SHARED_BY_PROFILE_ID_KEY) if sharer_id: # Sharer_id shouldn't go into session unless it's a valid ID, so no # need to catch invalid ID. sharer = Profile.objects.get(pk=sharer_id) subject = _("%s registered on Villages " "using your shared link") % profile send_mail_from_system(subject, sharer, 'shared_link_registration_email.txt', {'profile': profile})
def send(self): data = self.cleaned_data recipients = Profile.objects.filter(settings__send_newsletter=True) # TODO: Implement a send_mass_mail that re-uses the same connection # to send multiple mails. count = 0 for recipient in recipients.iterator(): send_mail_from_system( data['subject'], recipient, 'newsletter_email.txt', {'body': data['body']}) count += 1 return count
def send(self): data = self.cleaned_data recipients = Profile.objects.filter(settings__send_newsletter=True) # TODO: Implement a send_mass_mail that re-uses the same connection # to send multiple mails. count = 0 for recipient in recipients.iterator(): send_mail_from_system(data['subject'], recipient, 'newsletter_email.txt', {'body': data['body']}) count += 1 return count
def send(self): subject = _("Villages.cc Password Reset Link") send_mail_from_system(subject, self.profile, 'password_reset_email.txt', {'link': self})
def send_new_address_email(settings_obj): subject = _("Your Villages.cc email address has been updated") send_mail_from_system(subject, settings_obj.profile, 'new_email.txt', {'new_email': settings_obj.email})
def send_invitation_accepted_email(invitation, profile): "Let inviter know invitation has been accepted." subject = _("%s accepted your invitation to Villages") % profile send_mail_from_system(subject, invitation.from_profile, 'invitation_accepted_email.txt', {'profile': profile})
def send_registration_email(profile): subject = _("Welcome to Villages.cc") send_mail_from_system(subject, profile, 'registration_email.txt', {'profile': profile})
def send(self): subject = _("Villages.cc Password Reset Link") send_mail_from_system(subject, self.profile, 'password_reset_email.txt', {'link': self})
def send_new_address_email(settings_obj): subject = "Your Villages.cc email address has been updated" send_mail_from_system(subject, settings_obj.profile, 'new_email.txt', {'new_email': settings_obj.email})
def send_invitation_accepted_email(invitation, profile): "Let inviter know invitation has been accepted." subject = "%s accepted your invitation to Villages" % profile send_mail_from_system( subject, invitation.from_profile, 'invitation_accepted_email.txt', {'profile': profile})
def send_registration_email(profile): subject = "Welcome to Villages.cc" send_mail_from_system(subject, profile, 'registration_email.txt', {'profile': profile})