Beispiel #1
0
def test_attach_headers():
    msg = mail.MailRequest('test_attach_headers', 'tester@localhost', '*****@*****.**',
                           'Fake body.')

    comment.attach_headers(msg)
    for key in ['X-Post-Name', 'X-Post-User-ID', 'X-Post-Domain']:
        assert key in msg
Beispiel #2
0
def COMMENTING(message, user_id=None, post_name=None, host=None, domain=None):
    comment.attach_headers(message, user_id, post_name, domain)
    comment.defer_to_queue(message)
    original = message # keeps the template happy

    msg = view.respond(locals(), "mail/comment_submitted.msg",
                       From="noreply@%(host)s",
                       To=original['from'],
                       Subject="Your comment has been posted.")
    relay.deliver(msg)

    return COMMENTING
def COMMENTING(message, user_id=None, post_name=None, host=None, domain=None):
    comment.attach_headers(message, user_id, post_name, domain) 
    comment.defer_to_queue(message)
    original = message # keeps the template happy

    msg = view.respond(locals(), "mail/comment_submitted.msg",
                       From="noreply@%(host)s",
                       To=original['from'],
                       Subject="Your comment has been posted.")
    relay.deliver(msg)

    return COMMENTING
Beispiel #4
0
def START(message, user_id=None, post_name=None, host=None, domain=None):
    comment.attach_headers(message, user_id, post_name, domain)
    CONFIRM.send(relay, "comment", message, "mail/comment_confirm.msg",
                 locals())
    return CONFIRMING
Beispiel #5
0
def START(message, user_id=None, post_name=None, host=None, domain=None):
    comment.attach_headers(message, user_id, post_name, domain)
    CONFIRM.send(relay, "comment", message, "mail/comment_confirm.msg", locals())
    return CONFIRMING
Beispiel #6
0
def test_attach_headers():
    msg = mail.MailRequest("test_attach_headers", "tester@localhost", "*****@*****.**", "Fake body.")

    comment.attach_headers(msg)
    for key in ["X-Post-Name", "X-Post-User-ID", "X-Post-Domain"]:
        assert key in msg