from fastapi_mail import ConnectionConfig from pathlib import Path import os conf = ConnectionConfig( MAIL_USERNAME = os.environ["MAILER_USERNAME"], MAIL_PASSWORD = os.environ["MAILER_PASSWORD"], MAIL_FROM = os.environ["MAILER_FROM"], MAIL_PORT = os.environ["MAILER_PORT"], MAIL_SERVER = os.environ["MAILER_HOST"], MAIL_STARTTLS = True, MAIL_SSL_TLS = False, TEMPLATE_FOLDER = Path(__file__).parents[1] / 'templates', )