Skip to content

msaUtils Module

.email


Classes

MSASendEmail

Attributes

host instance-attribute
host: str = smtp_host
password instance-attribute
password: str = smtp_password
port instance-attribute
port: int = smtp_port
testmode instance-attribute
testmode: bool = testmode

Testmode True doesnt send the email out through SMTP Server

timeout instance-attribute
timeout: int = timeout
username instance-attribute
username: str = smtp_username

Functions

__init__
__init__(
    smtp_host: str,
    smtp_port: int,
    smtp_username: str,
    smtp_password: str,
    timeout: int = 60,
    testmode: bool = False,
)
send_email async
send_email(
    from_email: str,
    to_email: str,
    subject: str,
    body: str,
    jinja_template_path_html: str = "",
)

Send an email.

RAISES DESCRIPTION
TypeError

Error: MSASendEmail: HTML Templatefile ... not exists

TypeError

Error: MSASendEmail: SMTP Server Login failed for User


Last update: September 24, 2022
Created: September 24, 2022