Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
58

Send an email via Sendgrid sendgrid

Send an email using Sendgrid.

arguments

  • SENDGRID_APIKEY - API key from SendGrid (required)
  • SENDGRID_FROM - from header of mail (required)
  • SENDGRID_MAIL - mail where the letter will be sent, you can use comma divider to send on multiple mails (ex.: mail1@example.com, mail2@exmaple.com)
  • SENDGRID_MESSAGE - Text of message for type message
  • SENDGRID_SUBJECT - subject header of mail (required)
  • SENDGRID_TEMPLATE - Template of message for type message
  • SENDGRID_TYPE - type of mail [build, message, custom] (required)
    TestMail:
  type: sendgrid
  arguments:
    SENDGRID_APIKEY: '${{SENDGRID_APIKEY}}'
    SENDGRID_MAIL: '${{SENDGRID_MAIL}}'
    SENDGRID_FROM: '${{SENDGRID_FROM}}'
    SENDGRID_SUBJECT: '${{SENDGRID_SUBJECT}}'
    SENDGRID_TYPE: '${{SENDGRID_TYPE}}'
    SENDGRID_MESSAGE: '${{SENDGRID_MESSAGE}}'
    SENDGRID_TEMPLATE: '${{SENDGRID_TEMPLATE}}'

  
github.com
Pavel Kostohrys
Jul 4, 2021