Skip to content

Sending Email with SendGrid

Latest
Compare
Choose a tag to compare
@MuhammadJamee MuhammadJamee released this 01 Aug 19:57
a86be09

Sending Email with SendGrid

This Python-based SendGrid workflow allows you to send emails with both body content and attachments. The workflow utilizes the SendGrid API to send emails efficiently and reliably.

Key Features:

Simple Command-Line Interface: The workflow uses argparse to accept command-line arguments, making it easy to specify the recipient, subject, body content in markdown format, sender's email address, and the SendGrid API key.

Markdown Support: You can compose the body content of the email using markdown syntax, allowing for easy formatting of the email's text.

Multiple Recipients: The workflow supports sending emails to multiple recipients simultaneously, making it convenient for reaching multiple recipients with a single command.

Attachment Support: You can attach files to the email by providing the file path as an argument, making it possible to send important files along with the email.

  - name: 'Sending Email with SendGrid'
    uses: MuhammadJamee/email_generator@v1
    with:
      sendgrid-api-key: ${{ secrets.SENDGRID_API_KEY }}
      subject: 'New Release ${{ github.repository }}:${{ github.ref_name }}'
      from-email: [email protected]
      to-email: [email protected]
      body: 'Report is attached'
      attachment-file-path: 'reports.zip'