# SendGrid Tasks
Tasks for interacting with SendGrid.
# SendEmail
class
prefect.tasks.sendgrid.sendgrid.SendEmail
(from_email="notifications@prefect.io", to_emails=None, subject=None, html_content=None, category=None, attachment_file_path=None, sendgrid_api_key=None, **kwargs)[source]A task for sending an email via Twilio SendGrid.
Args:
from_email (str): The email address of the sender; defaults to notifications@prefect.ioto_emails (Union[str, Tuple[str, str], List[str], List[Tuple[str, str]]]): The email address of the recipient(s); can also be provided at runtime. Refer to SendGrid-Python for specifics.subject (str, optional): The subject of the email; can also be provided at runtimehtml_content (str): The html body of the email; can also be provided at runtimecategory (Union[str, List[str]], optional): The category/categories to use for the email; can also be provided at runtimeattachment_file_path (Union[str, Path], optional): The file path of the email attachment; can also be provided at runtimesendgrid_api_key (str): The SendGrid API key used for authentication; can also be provided at runtime, which is preferred since a secret can be used**kwargs (optional): additional kwargs to pass to theTaskconstructor
| methods: |
|---|
prefect.tasks.sendgrid.sendgrid.SendEmail.run (from_email="notifications@prefect.io", to_emails=None, subject=None, html_content=None, category=None, attachment_file_path=None, sendgrid_api_key=None)[source] |
Run message which sends an email via SendGrid.
|
This documentation was auto-generated from commit bd9182e
on July 31, 2024 at 18:02 UTC