GithubHelp home page GithubHelp logo

licenseware / send-email-notification Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 3.0 24 KB

Github action that will send email notification using SendGrid Email API

License: Apache License 2.0

Dockerfile 5.83% Python 94.17%
actions cicd sendgrid sendgrid-api sendgrid-mail python python3 docker dockerfile github-actions

send-email-notification's Introduction

Send Email Notification

Build Image pre-commit License

Using the Python library, send email to people with the content & subject of your choice.

This repository is used inside Github Actions in the following format:

Send email to one address

      - uses: licenseware/send-email-notification@v1
        with:
          api-key: ${{ secrets.SENDGRID_API_KEY }}
          subject: Test Subject
          from-email: [email protected]
          to-email: [email protected]
          markdown-body: |
            # My Markdown Title

            This is a description

            ## Another header

            Another description

Send email to multiple address upon Github release

on:
  release:
    types:
      - published

jobs:
  release-notification:
    name: release notification
    runs-on: ubuntu-latest
    strategy:
      matrix:
        to-emails:
          - [email protected]
          - [email protected]
          - [email protected]

    steps:
      - uses: licenseware/send-email-notification@v1
        with:
          api-key: ${{ secrets.SENDGRID_API_KEY }}
          subject: New Release ${{ github.repository }}:${{ github.ref_name }}
          from-email: [email protected]
          to-email: ${{ matrix.to-emails }}
          markdown-body: ${{ github.event.release.body }}

Send email with attachments

      - uses: licenseware/send-email-notification@v1
        with:
          api-key: ${{ secrets.SENDGRID_API_KEY }}
          subject: Test Subject
          from-email: [email protected]
          to-email: [email protected]
          markdown-body: |
            Hey, check out this file
          attachments: |
            ./path/to/file1.txt
            ./path/to/file2.txt
          # optionally, a list of zero, one, or the same size {inline, attachment}
          attachments-disposition: |
            attachment
            attachment

send-email-notification's People

Contributors

meysam81 avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

send-email-notification's Issues

Attachments

Can we send attachments using this workflow?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.