Skip to content

Releases: mailgun/mailgun-go

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

v4.20.6

10 Dec 18:10
5003ccc
Compare
Choose a tag to compare

What's Changed

Full Changelog: v4.20.5...v4.20.6

v4.20.5

07 Dec 12:21
8e3c3ac
Compare
Choose a tag to compare

What's Changed

Full Changelog: v4.20.4...v4.20.5

v4.20.4

04 Dec 13:10
b3b8931
Compare
Choose a tag to compare

What's Changed

Full Changelog: v4.20.3...v4.20.4

v4.20.3

04 Dec 10:31
8fd2c2b
Compare
Choose a tag to compare

What's Changed

  • DE-1370 Add typecheck, goimports, govet, noctx linters by @vtopc in #358

Full Changelog: v4.20.2...v4.20.3

v4.20.2

03 Dec 20:55
7574b73
Compare
Choose a tag to compare

What's Changed

Full Changelog: v4.20.1...v4.20.2