Ejemplo n.º 1
0
def queue_test_invite(db, sender_name, sender_email, recipient, service_name):
    '''Queues an invitation. Note: Does not commit the transaction.'''

    email_queue._queue(
        db, models2.EmailQueue, email_queue._TYPE_INVITATION,
        [sender_name, sender_email, recipient, service_name, 'token_string'],
        None, None)
Ejemplo n.º 2
0
def queue_test_mandrill_message(db, email_type, template_name, template_params,
    subject, sender_name, sender_email, recipient_name, recipient_email):
    assert template_name
    assert isinstance(template_params, dict)
    assert '@' in recipient_email
    if template_name == 'share-to-recipient-web':
       print 'igoring message of type share-to-recipient-web'
       return
    email_queue._queue(db, models2.EmailQueue, email_type,
        [subject, sender_name, sender_email, recipient_name, recipient_email],
        template_name, template_params)
Ejemplo n.º 3
0
def queue_test_mandrill_message(db, email_type, template_name, template_params,
                                subject, sender_name, sender_email,
                                recipient_name, recipient_email):
    assert template_name
    assert isinstance(template_params, dict)
    assert '@' in recipient_email
    if template_name == 'share-to-recipient-web':
        print 'igoring message of type share-to-recipient-web'
        return
    email_queue._queue(
        db, models2.EmailQueue, email_type,
        [subject, sender_name, sender_email, recipient_name, recipient_email],
        template_name, template_params)
Ejemplo n.º 4
0
def queue_test_invite(db, sender_name, sender_email, recipient, service_name):
    '''Queues an invitation. Note: Does not commit the transaction.'''

    email_queue._queue(db, models2.EmailQueue, email_queue._TYPE_INVITATION,
        [sender_name, sender_email, recipient, service_name, 'token_string'],
        None, None)