mailer = Mailer(dict(
transport = dict(
use = 'smtp',
host = 'smtp.gmail.com',
port = '587',
username = username,
password = password,
tls = 'required',
debug = True)))
mailer.start()
message = Message(author="f@e.com", to="t@e.com")
message.subject = "Testing Marrow Mailer"
message.plain = "This is a test."
mailer.send(message)
mailer.stop()
But i gives an exception:
Traceback (most recent call last):
File "send_email.py", line 14, in <module>
debug = True)))
File "/Users/user/.virtualenvs/w1/lib/python2.7/site-packages/marrow/mailer/__init__.py", line 55, in __init__
if isinstance(config.manager, basestring):
File "/Users/user/.virtualenvs/w1/lib/python2.7/site-packages/marrow/util/bunch.py", line 29, in __getattr__
raise AttributeError(name)
AttributeError: manager
So, I added manager:
mailer = Mailer(dict(
transport = dict(
use = 'smtp',
host = 'smtp.gmail.com',
port = '587',
username = username,
password = password,
tls = 'required',
debug = True),
manager = dict()))
mailer.start()
message = Message(author="f@e.com", to="t@e.com")
message.subject = "Testing Marrow Mailer"
message.plain = "This is a test."
mailer.send(message)
mailer.stop()
This is a bug in the configuration parser, not in the included README. Manager should successfully default to immediate without needing a configuration defined.
I tried to use the example given in the read me:
But i gives an exception:
So, I added manager:
And it worked.