Ejemplo n.º 1
0
def send_notify_activation(request, user):
    '''
    Sends an email to the admins once a user was activated.
    '''
    send_mail(request, 'account/email/notify_activation', {
        'user': user,
        'request_user': request.user
    }, get_manager_emails())
Ejemplo n.º 2
0
def send_activation(request, user):
    '''
    Sends an email to the once he/she was activated.
    '''
    send_mail(
        request, 'account/email/activation', {
            'user': user,
            'login_url': request.build_absolute_uri(reverse('account_login'))
        }, [user.email])
Ejemplo n.º 3
0
def send_request_activation(request, user):
    '''
    Sends an email to the admins once a users email was validated.
    '''
    send_mail(
        request, 'account/email/request_activation', {
            'user': user,
            'users_url': request.build_absolute_uri(reverse('auth:users'))
        }, get_manager_emails())
Ejemplo n.º 4
0
def send_contact_message(request, message):

    emails = get_admin_emails()
    context = {
        'user': message.user,
        'author': message.author,
        'email': message.email,
        'subject': message.subject,
        'message': message.message,
    }
    send_mail(request, 'contact/email/new_message_admins', context, emails)
    send_mail(request, 'contact/email/new_message_user', context, [message.email])
Ejemplo n.º 5
0
def send_contact_message(request, message):
    # sends an email to the admins, managers and the user once a message was submitted.
    context = {
        'user': message.user,
        'author': message.author,
        'email': message.email,
        'subject': message.subject,
        'message': message.message,
        'url': request.build_absolute_uri(reverse('contact:messages'))
    }
    send_mail(request, 'contact/email/new_message_admin', context,
              get_manager_emails())
    send_mail(request, 'contact/email/new_message_user', context,
              [message.email])
Ejemplo n.º 6
0
def send_registration_mails(request, meeting, participant, contribution=None):
    # sends an email to the admins once a user was activated.
    send_mail(
        request, 'meetings/email/notify_registration', {
            'meeting': meeting,
            'participant': participant,
            'contribution': contribution
        }, get_manager_emails())

    # sends an email to the once he/she was activated.
    send_mail(
        request, 'meetings/email/registration', {
            'meeting': meeting,
            'participant': participant,
            'contribution': contribution
        }, [participant.email])
Ejemplo n.º 7
0
def send_notify_password_changed(request, user):
    '''
    Sends an email to the admins once a user updated his/her account.
    '''
    send_mail(request, 'account/email/notify_password_changed', {'user': user},
              get_admin_emails())