Add support for one time use email address

The one time use address are a unique token which maps to stored stated
in redis. We store the user_id, recipient_id, and subject. When an email
is received at this address it is sent to the stored recipient by the
stored user. Anyone with this address can send a single message as this
user.

(imported from commit 4219417bdc30c033a6cf7a0c7c0939f7d0308144)
This commit is contained in:
Jason Michalski
2014-07-25 01:40:40 -07:00
committed by Waseem Daher
parent 52944622f8
commit 2a5ec20295
4 changed files with 126 additions and 22 deletions

View File

@@ -318,7 +318,8 @@ class MirrorWorker(QueueProcessingWorker):
# who gets a digest is entirely determined by the enqueue_digest_emails
# management command, not here.
def consume(self, event):
mirror_email(email.message_from_string(event["message"].encode("utf-8")), rcpt_to=event["rcpt_to"])
mirror_email(email.message_from_string(event["message"].encode("utf-8")),
rcpt_to=event["rcpt_to"], pre_checked=True)
@assign_queue('test')
class TestWorker(QueueProcessingWorker):