Skip to content

Releases: mailgun/mailgun-go

v5.1.0

01 Apr 16:18
b4bfdc0
Compare
Choose a tag to compare

What's Changed

  • DE-1503 Fix examples by @vtopc in #405
  • DE-1504 Generate models for Alerts(oapi-codegen) by @vtopc in #406
  • DE-1505 Generate Blocklist Monitoring models by @vtopc in #408
  • EASY-597: Increase max tag limit to 10 per message by @forcewhisperer in #409

Full Changelog: v5.0.0...v5.1.0

v5.0.0

15 Mar 14:33
a9e0a7d
Compare
Choose a tag to compare

What's Changed

Breaking changes:

Mailgun client is now domain agnostic

  • No need to pass the domain into the func mailgun.NewMailgun
  • Many methods now require passing a domain, which indicates which methods are domain-specific and which are global for your account.
    • Pay attention to that func NewMessage(domain, from, subject, text string, to ...string) has a variadic to argument, so there would be no compile error if you miss passing domain.

Types and mocks

  • API requests, responses, and helper types are moved into github.com/mailgun/mailgun-go/v5/mtypes package.
  • Event interface and parsers moved to github.com/mailgun/mailgun-go/v5/events
  • mocks moved to github.com/mailgun/mailgun-go/v5/mocks to address #322 and #332

Messages

  • Send() and ReSend() methods now returns mtypes.SendMessageResponse.
  • Deprecated NewMessage() and NewMIMEMessage() methods have been removed, use relative funcs.
  • Deprecated GetStoredMessageForURL method has been removed.
  • Deprecated GetStoredMessageRawForURL method has been removed.

Validation

  • Deprecated NewEmailValidator and NewEmailValidatorFromEnv have been removed, use ValidateEmail(...) method of Mailgun.
  • Deprecated IsValid field is removed from the response; use Risk.

Subaccounts

  • Deprecated SubaccountDetails(ctx context.Context, subaccountId string) method is removed, use GetSubaccount(ctx context.Context, subaccountID string).

Domains

  • Deprecated func UpdateDomainTrackingWebPrefix is removed, use func UpdateDomain.
  • Deprecated func VerifyDomain is removed, use func VerifyAndReturnDomain.
  • Deprecated field CreateDomainOptions.IPS has been removed, use CreateDomainOptions.IPs.
  • ListEventsWithDomain(opts *ListEventOptions, domain string) -> ListEvents(domain string, opts *ListEventOptions).

Metrics

  • The deprecated field ESPBlockCount has been removed. Use TemporaryFailedESPBlockCount.

IPs

  • Deprecated ListDomainIPS(...) is removed, use ListDomainIPs(...).
  • Deprecated ListIPS(ctx context.Context, dedicated bool) is removed, use ListIPs(ctx context.Context, dedicated, enabled bool) (has new enabled argument).

Webhooks

  • Deprecated VerifyWebhookRequest method has been removed.

Other changes

These changes might be breaking in some cases.

  • Send(ctx context.Context, m Message) method now accepts the Message interface instead of a pointer to struct.

  • SetAPIBase() method now returns an error.

  • For the EU: do mg.SetAPIBase(mailgun.APIBaseEU) instead of mg.SetAPIBase("https://api.eu.mailgun.net/v...").

  • The Webhook Signing Key is now optional and is unrelated to the API key. If it is not set(by SetWebhookSigningKey(webhookSigningKey string) method), don't call the VerifyWebhookSignature() method, as it will always fail.

  • mailgun.MailgunImpl is renamed to mailgun.Client for not stuttering.

PRs:

Full Changelog: v4.23.0...v5.0.0

v5.0.0-rc.2

14 Mar 12:59
Compare
Choose a tag to compare
v5.0.0-rc.2 Pre-release
Pre-release

Breaking changes:

Mailgun client is now domain agnostic

  • No need to pass the domain into the func mailgun.NewMailgun
  • Many methods now require passing a domain, which indicates which methods are domain-specific and which are global for your account.
    • Pay attention to that func NewMessage(domain, from, subject, text string, to ...string) has a variadic to argument, so there would be no compile error if you miss passing domain.

Types and mocks

  • API requests, responses, and helper types are moved into github.com/mailgun/mailgun-go/v5/mtypes package.
  • Event interface and parsers moved to github.com/mailgun/mailgun-go/v5/events
  • mocks moved to github.com/mailgun/mailgun-go/v5/mocks to address #322 and #332

Messages

  • Send() and ReSend() methods now returns mtypes.SendMessageResponse.

Validation

  • Deprecated NewEmailValidator and NewEmailValidatorFromEnv are removed, use ValidateEmail(...) method of Mailgun.
  • Deprecated IsValid field is removed from the response; use Risk.

Subaccounts

  • Deprecated SubaccountDetails(ctx context.Context, subaccountId string) method is removed, use GetSubaccount(ctx context.Context, subaccountID string).

Domains

  • Deprecated func UpdateDomainTrackingWebPrefix is removed, use func UpdateDomain.
  • Deprecated func VerifyDomain is removed, use func VerifyAndReturnDomain.
  • Deprecated field CreateDomainOptions.IPS is removed, use CreateDomainOptions.IPs.
  • ListEventsWithDomain(opts *ListEventOptions, domain string) -> ListEvents(domain string, opts *ListEventOptions).

Metrics

  • The deprecated field ESPBlockCount has been removed. Use TemporaryFailedESPBlockCount.

IPs

  • Deprecated ListDomainIPS(...) is removed, use ListDomainIPs(...).
  • Deprecated ListIPS(ctx context.Context, dedicated bool) is removed, use ListIPs(ctx context.Context, dedicated, enabled bool) (has new enabled argument).

Webhooks

  • Deprecated VerifyWebhookRequest method has been removed.

Other changes

These changes might be breaking in some cases.

  • Send(ctx context.Context, m Message) method now accepts the Message interface instead of a pointer to struct.

  • SetAPIBase() method now returns an error.

  • For the EU: do mg.SetAPIBase(mailgun.APIBaseEU) instead of mg.SetAPIBase("https://api.eu.mailgun.net/v...").

  • The Webhook Signing Key is now optional and does not relate to the API key. If it is not set(by SetWebhookSigningKey(webhookSigningKey string) method), don't call the VerifyWebhookSignature() method, as it will always fail.

  • mailgun.MailgunImpl is renamed to mailgun.Client for not stuttering.

What's Changed

  • DE-1146 fix link to API documentation by @vtopc in #397
  • DE-1497 Remove the need for 'from' when sending messages with a template by @vtopc in #399
  • adding enabled parameter support to ListIPs by @Szasza in #401
  • DE-1501 Add support for the 'enabled' parameter in the ListIPs API call for v4 by @vtopc in #403
  • DE-1502 Deprecate things in v4 by @vtopc in #404
  • Fix TODOs and remove deprecated things by @vtopc in #402

Full Changelog: v4.23.0...v5.0.0-rc.2

v4.23.0

14 Mar 12:55
4144813
Compare
Choose a tag to compare

What's Changed

  • DE-1501 Add support for the 'enabled' parameter in the ListIPs API call for v4 by @vtopc in #403
  • DE-1502 Deprecate things in v4 by @vtopc in #404

Full Changelog: v4.22.3...v4.23.0

v4.22.3

10 Mar 17:28
93ac946
Compare
Choose a tag to compare

What's Changed

  • DE-1497 Remove the need for 'from' when sending messages with a template by @vtopc in #399

Full Changelog: v4.22.2...v4.22.3

v5.0.0-rc.1

02 Mar 10:08
ecd8b0b
Compare
Choose a tag to compare
v5.0.0-rc.1 Pre-release
Pre-release

What's Changed

Breaking changes:

Mailgun client is now domain agnostic

  • No need to pass the domain into the func mailgun.NewMailgun
  • Many methods now require passing a domain, which indicates which methods are domain-specific and which are global for your account.
    • Pay attention to that func NewMessage(domain, from, subject, text string, to ...string) *PlainMessage has a variadic to argument, so there would be no compile error if you miss passing domain.

Types and mocks

  • API requests, responses, and helper types are moved into github.com/mailgun/mailgun-go/v5/mtypes package.
  • Event interface and parsers moved to github.com/mailgun/mailgun-go/v5/events
  • mocks moved to github.com/mailgun/mailgun-go/v5/mocks to address #322 and #332

Validation

  • ValidateEmail(...) moved to Mailgun.
  • The IsValid field is removed from the response; use Risk.

Subaccounts

  • SubaccountDetails(ctx context.Context, subaccountId string) renamed to GetSubaccount(ctx context.Context, subaccountID string) for consistency.

Domains:

  • Deprecated func UpdateDomainTrackingWebPrefix is removed, use func UpdateDomain.
  • func VerifyAndReturnDomain is removed, use func VerifyDomain.

Metrics

  • The deprecated field ESPBlockCount has been removed. Use TemporaryFailedESPBlockCount.

Other changes

These changes might be breaking in some cases.

  • Send(ctx context.Context, m SendableMessage) (mes string, id string, err error) now accepts interface.

  • SetAPIBase() now returns an error.

  • For the EU: do mg.SetAPIBase(mailgun.APIBaseEU) instead of mg.SetAPIBase("https://api.eu.mailgun.net/v...").

  • The Webhook Signing Key is optional now and does not relate to the API key. If the Webhook Signing Key is not set(by SetWebhookSigningKey(webhookSigningKey string)), don't call the VerifyWebhookSignature() method, as it will always fail.

  • mailgun.MailgunImpl is renamed to mailgun.Client for not stuttering.

PRs

  • DE-1386 removed deprecated (mg *MailgunImpl) NewMessage method by @vtopc in #365
  • DE-1387 Remove func (mg *MailgunImpl) NewMIMEMessage(…) *Message  by @vtopc in #366
  • DE-1388 (mg *MailgunImpl) Send should accept interface, not struct by @vtopc in #368
  • DE-1394 Remove deprecated v3 Validation by @vtopc in #371
  • DE-1392 Remove deprecated GetStats by @vtopc in #372
  • DE-1410 Remove deprecated GetStoredMessageForURL() and GetStoredMessageRawForURL() methods by @vtopc in #373
  • DE-1411 Remove deprecated VerifyWebhookRequest() method by @vtopc in #374
  • DE-1390 Remove CaptureCurlOutput by @vtopc in #375
  • DE-1384 Domain agnostic API by @vtopc in #376
  • DE-1383 Move the API version out of the base URL by @vtopc in #377
  • DE-1383 Move the API version out of the base URL 2 by @vtopc in #378
  • DE-1394 Removed deprecated v3 validation fields by @vtopc in #379
  • DE-1384 Domain agnostic client(fix example) by @vtopc in #380
  • DE-1412 Move ValidateEmail() to MailgunImpl by @vtopc in #383
  • DE-1416 Switch subaccounts to v5 by @vtopc in #384
  • backport #386 by @vtopc in #387
  • DE-1417 Switch domains to v4 by @vtopc in #388
  • DE-1389 Make Webhook Signing Key optional by @vtopc in #390
  • DE-1449 Metrics: Remove Deprecated ESPBlockCount by @vtopc in #392
  • DE-1393 Move API Mailgun requests, responses, and helper types into a separate package by @vtopc in #393
  • DE-1393 Move public mocks to subfolder by @vtopc in #394
  • DE-1391 Enable more linters by @vtopc in #395
  • DE-1146 github.com/mailgun/mailgun-go/v5 by @vtopc in #396

Full Changelog: v4.22.2...v5.0.0-rc.1

v4.22.2

01 Mar 20:33
554933d
Compare
Choose a tag to compare

What's Changed

  • DE-1417 deprecate UpdateDomainTrackingWebPrefix by @vtopc in #389
  • Bump github.com/go-chi/chi/v5 from 5.2.0 to 5.2.1 by @dependabot in #391

Full Changelog: v4.22.1...v4.22.2

v4.22.1

06 Feb 18:06
5383a71
Compare
Choose a tag to compare

What's Changed

  • DE-1457 populate EmailVerification.IsValid field by @vtopc in #386

Full Changelog: v4.22.0...v4.22.1

v4.22.0

30 Jan 17:46
c7963bd
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.21.0...v4.22.0

v4.21.0

11 Dec 19:07
2c28b1e
Compare
Choose a tag to compare

What's Changed

  • DE-1372 Add getters for plain text message by @vtopc in #363

Full Changelog: v4.20.6...v4.21.0