Skip to content

cybervoid/action-send-email-nodemailer

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Send email via Nodemailer Github Action

This action allows to Send an Email via Nodemailer, a Nodejs module to send Emails.

Key features:

  • Heavy focus on security
  • Support of multiple transports (SMTP, AWS SES)
  • Unicode support (like emojie support)

Full list of Features

Example usage

- name: Send mail
  uses: cybervoid//action-send-email-nodemailer@v1
  env:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  with:
    to: [email protected],[email protected]
    from: '"John Smith <[email protected]>"'
    subject: 'This is my subject'
    body: Sample email from ${{github.repository}}. Hello World!
- name: Was the email sent
  run: echo "Was the email sent? ${{ steps.message.outputs.message }}"

Outputs

message

Returned message object from Nodemailer

So far I only need the integration for AWS SES. If you need to add another transporter PRs are welcome or open an issue.

Steps to Setup AWS SES as a transport

  • Generate AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY with proper permissions to use SES
  • Add them as Github Secret
  • Include as environment variable when calling the action.