rduplain/flask-mail — Issue #1: Support for bulk email sending
Author: rduplain
Created: 2012-02-29 16:41:50+00:00
State: open
Labels: enhancement, import

A Relay class which handles mutliple messages per connection. This would be useful when sending bulk email messages e.g in a script or cronjob.

It would be used like this:

#!python

from flaskext.mail import Message, PersistentRelay

def send_bulk_emails(users, relay):
for user in users:
message = Message(recipients=[user.email])
# configure message
message.send(relay=relay)

relay = PersistentRelay()

with relay.connect():
send_bulk_emails(users, relay)

---------------------------------------
- Bitbucket: https://bitbucket.org/danjac/flask-mail/issue/1
- Originally Reported By: [Dan Jacob](http://bitbucket.org/danjac)
- Originally Created At: 2010-07-15 10:18:09