예제 #1
0
파일: views.py 프로젝트: mpants/villagescc
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})
예제 #2
0
파일: views.py 프로젝트: us1415/villagescc
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})
예제 #3
0
    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
예제 #4
0
    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
예제 #5
0
파일: models.py 프로젝트: szoth/villagescc
 def send(self):
     subject = _("Villages.cc Password Reset Link")
     send_mail_from_system(subject, self.profile, 'password_reset_email.txt',
                           {'link': self})
예제 #6
0
파일: views.py 프로젝트: us1415/villagescc
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})
예제 #7
0
파일: views.py 프로젝트: us1415/villagescc
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})
예제 #8
0
파일: views.py 프로젝트: us1415/villagescc
def send_registration_email(profile):
    subject = _("Welcome to Villages.cc")
    send_mail_from_system(subject, profile, 'registration_email.txt',
                          {'profile': profile})
예제 #9
0
 def send(self):
     subject = _("Villages.cc Password Reset Link")
     send_mail_from_system(subject, self.profile, 'password_reset_email.txt',
                           {'link': self})
예제 #10
0
파일: views.py 프로젝트: mpants/villagescc
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})
예제 #11
0
파일: views.py 프로젝트: mpants/villagescc
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})
예제 #12
0
파일: views.py 프로젝트: mpants/villagescc
def send_registration_email(profile):
    subject = "Welcome to Villages.cc"
    send_mail_from_system(subject, profile, 'registration_email.txt',
                          {'profile': profile})