send_email_with_gmail

send_email_with_gmail(username, password, i_email)

Send an Email object via Gmail.

Parameters

username : str

Gmail account username for sending the email

password : str

Gmail app password

i_email : Email

Email object containing the email content and attachments

Returns

: None

The function sends an email but doesn’t return a value

Examples

email = Email(
    html="<p>Hello world</p>",
    subject="Test Email",
    recipients=["user@example.com"],
)

send_email_with_gmail("user@gmail.com", "password123", email)