1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/project/common/jobs.py

14 lines
350 B
Python
Raw Normal View History

2016-01-24 19:54:57 +00:00
from mail_templated import send_mail
def send_email(job):
template = job.workspace['template']
context = job.workspace['context'] or {}
to_email = job.workspace['to_email']
from_email = job.workspace['from_email']
if type(to_email) != list:
to_email = [to_email]
send_mail(template, context, from_email, to_email)