Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(email): added Metadata to model #7

Merged
merged 2 commits into from
Nov 1, 2022
Merged

Conversation

mattevans
Copy link
Owner

Adds Metadata to the email model to support custom metadata key/value pairs.

https://postmarkapp.com/developer/api/email-api

Usage:

emailReq := &postmark.Email{
  From:       "mail@company.com",
  To:         "jack@sparrow.com",
  TemplateID: 123456,
  TemplateModel: map[string]interface{}{
    "name": "Jack",
    "action_url": "http://click.company.com/welcome",
  },
  Tag:        "onboarding",
  TrackOpens: true,
  Metadata: map[string]string{
    "client-id": "123456",
    "client-ip": "127.0.0.1",
  },
}

@mattevans mattevans self-assigned this Nov 1, 2022
@mattevans mattevans merged commit 94af12d into master Nov 1, 2022
@mattevans mattevans deleted the add-metadata-email-struct branch November 1, 2022 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant