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

DE-1146 Release v5 #367

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

DE-1146 Release v5 #367

wants to merge 31 commits into from

Conversation

vtopc
Copy link
Contributor

@vtopc vtopc commented Dec 15, 2024

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

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.

@vtopc vtopc changed the title DE-1387 Release v5 DE-1146 Release v5 Feb 20, 2025
@vtopc vtopc marked this pull request as ready for review March 1, 2025 14:13
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.

1 participant