Skip to content
zach latta edited this page May 26, 2020 · 12 revisions

Postman reads attributes from a CSV file, injects them into provided templates, then mails them through an SMTP server.

CSV

Requirements

Provided CSV files must meet the following requirements:

  • Have a header column
  • Contain a column with a header that, when lowercased, matches "email". Ex. "Email"
    • Emails to send to will be read from this column.
Example
Email,Name,Type
[email protected],Arthur Dent,Human
[email protected],Ford Prefect,Human
[email protected],Martin,Robot
[email protected],Trillian,Human

Templates

  • Uses the Go template package.
    • All features of the template package are supported (read: conditionals).
Basic Example
Hello {{.Name}}. How are you doing on this fine day? We just launched our new product!

Best regards,
ACME Corp
Advanced Example
Hello {{.Name}},

{{if .PreviousCustomer}}
I see that you've done business with us before.
{{else}}
Would you be interested in doing business with us?
{{end}}

Best regards,
ACME Corp
Clone this wiki locally