예제 #1
0
 def send(self):
     msg = FlaskMessage(
         subject=self.compiled_title,
         body=self.compiled_body,
         sender=self.send_from,
         recipients=[self.send_to])
     FlaskMail(app).send(message=msg)
     self.save()
예제 #2
0
    def send(self):
        from flask_mail import Message as FlaskMessage
        from flask_mail import Mail as FlaskMail

        msg = FlaskMessage(
            subject=self.compiled_title,
            html=self.compiled_body,
            sender=self.send_from,
            recipients=[self.send_to])
        mail = FlaskMail()
        mail.send(message=msg)

        self.save()
예제 #3
0
    if match:
        filename = re.sub(r'[^A-Za-z0-9\-\_\. ]', '', match.group(2))
        playground = SavedFile(match.group(1),
                               section='playgroundsources',
                               fix=True,
                               filename=filename)
        write_ml_source(playground, match.group(1), filename)
        return playground
    return (None)


if 'mailgun domain' in daconfig['mail'] and 'mailgun api key' in daconfig[
        'mail']:
    mail = MailgunMail(app)
else:
    mail = FlaskMail(app)


def da_send_mail(the_message):
    mail.send(the_message)


import docassemble.webapp.machinelearning
import docassemble.base.functions
from docassemble.base.functions import dict_as_json
DEFAULT_LANGUAGE = daconfig.get('language', 'en')
DEFAULT_LOCALE = daconfig.get('locale', 'en_US.utf8')
DEFAULT_DIALECT = daconfig.get('dialect', 'us')
if 'timezone' in daconfig and daconfig['timezone'] is not None:
    DEFAULT_TIMEZONE = daconfig['timezone']
else:
예제 #4
0
 def __init__(self):
     self.mail = FlaskMail()