Messages
Send email messages to your users with a single command.
info
This function will only work with verified users in your project.
info
The email will be sent from <subdomain>@abstra-notifications.com
. You might want to whitelist this domain to avoid the email being marked as spam.
Examples
Single recipient with subject
from abstra.messages import send_email
send_email("michael.scott@dundermifflin.com", title="Toby is back", message="No god please no")
Multiple recipients
from abstra.messages import send_email
to = [
"dwight.schrute@dundermifflin.com",
"jim.halpert@dundermifflin.com",
"pam.beesly@dundermifflin.com"
]
send_email(to, message="Hello everyone!")
Parameters
Parameter | Type | Description |
---|---|---|
to | str | list[str] | The email addresses of the recipients. |
message | str | The message you want to send to the recipients. |
title | optional[str] | The subject of email to be sent to the recipients |