diff --git a/jm2l/__init__.py b/jm2l/__init__.py index 59a5bda..40e9f00 100644 --- a/jm2l/__init__.py +++ b/jm2l/__init__.py @@ -46,14 +46,14 @@ def mailer_tasks(config): Mail_template = Template(filename='jm2l/templates/mail_html.mako') mail_html = Mail_template.render(request=request, User=StaffUser, Contact=Contact, action="Tasks") # Prepare Message - message = Message(subject="[JM2L] Rappel des Tâches pour les JM2L".decode('utf-8'), + message = Message(subject="[JM2L] Le mail de rappel pour les JM2L !", sender="contact@jm2l.linux-azur.org", recipients=[StaffUser.mail], body=mail_plain, html=mail_html) message.add_bcc("spam@style-python.fr") - mailer.send(message) + mailer.send_immediately(message) def main(global_config, **settings): """ This function returns a Pyramid WSGI application. @@ -76,7 +76,6 @@ def main(global_config, **settings): config.add_subscriber(add_renderer_globals, BeforeRender) config.registry['mailer'] = mailer_factory_from_settings(settings) sched = BackgroundScheduler() - #sched.add_job(mailer_tasks, 'interval', minutes=1, args=[ config ]) sched.add_job(mailer_tasks, 'cron', day_of_week='fri', hour=18, args=[ config ]) sched.start() # start the scheduler config.add_renderer('json', JSON(indent=4)) diff --git a/jm2l/templates/mail_html.mako b/jm2l/templates/mail_html.mako index e07f64a..8027ed7 100644 --- a/jm2l/templates/mail_html.mako +++ b/jm2l/templates/mail_html.mako @@ -92,7 +92,7 @@ Voici ce qu'il y'a dans la liste des tâches qui te sont assignées: % if not t.closed: