Skip to content
mail

GitHub Action

Send mailer

v1.0.2 Latest version

Send mailer

mail

Send mailer

Dynamically send an email with attachments

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Send mailer

uses: devellany/[email protected]

Learn more about this action in devellany/send-mail

Choose a version

send-mailer

  • This is GitHub custom action.
  • Dynamically send an email with attachments.

Sample .yml

- name: Send email
  uses: devellany/[email protected]
  with:
    host: smtp.google.com
      # Optional port (defaults to 465)
      port: 465
      account: ${{secrets.ACCOUNT}}
      password: ${{secrets.MAIL_PASSWORD}}
      sender: devellany
      from: ${{secrets.MAIL_ADDRESS}}
      to: [email protected]
      subject: mail title.
      body: your messages.
      # Optional content type (defaults to text/plain)
      contentType: text/plain
      # Optional attachment files (JSON type. require property 'path')
      attachments: '[{"path":"README.md"}]'

How to Secrets.KEY

how to secrets.KEY

What is 'Dynamically' send an email?

Some properties can read files. The prefix 'file://' if you want to read a file.

Applicable properties

  • to
  • subject
  • body
  • contetnType
  • attachments
- name: Send email
 uses: devellany/[email protected]
 with:
   host: smtp.google.com
     account: ${{secrets.ACCOUNT}}
     password: ${{secrets.MAIL_PASSWORD}}
     sender: devellany
     from: ${{secrets.MAIL_ADDRESS}}
     to: [email protected]
     subject: mail title.
     body: file://README.md
     contentType: text/html
     attachments: file://attachmets.json

Sample Repository

send-mail-sample