I am trying to configure TurboMail 3 using Pylons 1.0
Following the docs here
I added this to development.ini
[DEFAULT]
...
mail.on = true
mail.manager = immediate
mail.transport = smtp
mail.smtp.server = localhost
and my app_globals.py looks like this:
"""The application Globals object"""
from beaker.cache import CacheManager
from beaker.util import parse_cache_config_options
class Globals(object):
def __init__(self, config):
self.cache = CacheManager(**parse_cache_config_options(config))
from turbomail.adapters import tm_pylons
tm_pylons.start_extension()
My controller has this method:
def submit(self):
message = Message("from@example.com", "to@example.com", "Hello World")
message.plain = "TurboMail is really easy to use."
message.send()
The problem is that I get this error when calling message.send ():
MailNotEnabledException: An attempt was made to use a facility of the TurboMail framework but outbound mail hasn't been enabled in the config file [via mail.on]
I don’t know what I am missing here? All this seems to be correct according to the docs!
thank
source
share