Skip to content

orus-io/email-resource

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Resource

Build Status

A Concourse resource that sends emails.

Getting started

Add the following Resource Type to your Concourse pipeline

resource_types:
  - name: email
    type: docker-image
    source:
      repository: pcfseceng/email-resource

Look at the demo pipeline for a complete example.

This resource acts as an SMTP client, using PLAIN auth over TLS. So you need an SMTP server that supports all that.

For development, we've been using Amazon SES with its SMTP support

Source Configuration

An example source configuration is below. None of the parameters are optional.

resources:
- name: send-an-email
  type: email
  source:
    smtp:
      host: smtp.example.com
      port: "587" # this must be a string
      username: a-user
      password: my-password
    from: build-system@example.com
    to: [ "dev-team@example.com", "product@example.net" ]

Note that to is an array, and that port is a string. If you're using fly configure with the --load-vars-from (-l) substitutions, every {{ variable }} automatically gets converted to a string. But for literals you need to surround it with quotes.

Behavior

This is an output-only resource, so check and in actions are no-ops.

out: Send an email

Parameters

  • headers: Optional. Path to plain text file containing additional mail headers
  • subject: Required. Path to plain text file containing the subject
  • body: Required. Path to file containing the email body.
  • send_empty_body: Optional. If true, send the email even if the body is empty (defaults to false).

For example, a build plan might contain this:

  - put: send-an-email
    params:
      subject: demo-prep-sha-email/generated-subject
      body: demo-prep-sha-email/generated-body

HTML Email

To send HTML email set the headers parameter to a file containing the following:

MIME-version: 1.0
Content-Type: text/html; charset="UTF-8"

About

A Concourse resource that sends emails - this temporary fork include the upstream PR(s) we need

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.5%
  • Shell 4.5%