Repository navigation
Conversation
Releases v1.1.0 and v1.2.0 failed at "Check release version" because mix.exs was never bumped by hand. Rewrite @Version from the release tag before testing and publishing, matching the Node and Python SDK release flow.
An empty secret let anyone compute a valid HMAC. Return
{:error, :invalid_signature} when the secret is nil or empty.
…ator lib/lettermint/generated/ is emitted by lettermint/sdk-generator (emit elixir, next profile, spec 80d8ab2a2d). scripts/generate.sh regenerates or checks it when the generator is available, and otherwise verifies the generated headers.
One client holds the sending and the team token (Lettermint.new/1,2, with
token format detection for a bare string); Lettermint.Emails uses the sending
token, every other module the team token, and ping/reschedule/cancel either.
A missing token raises Lettermint.ConfigError that names the option.
- The Team API follows the shared layout: Projects.ReportForwarding,
Team.Members and Webhooks.Deliveries modules, iterate functions that return
a Stream, and nested query maps serialized like the Node SDK.
- One exception struct per error kind (APIError and its per-status variants,
TimeoutError, ConnectionError with the HTTP client's reason,
UnexpectedResponseError, RedirectError, ClientValidationError, ConfigError,
WebhookVerificationError); calls return {:error, error}.
- The timeout covers the whole request; an empty 2xx body where JSON is
expected and a body that cannot be encoded as JSON are errors.
- Tokens and webhook secrets live in closures, so no debug output shows them.
- Webhook verification takes the headers, requires X-Lettermint-Delivery and
returns a WebhookPayload.
- Types come from the generated Lettermint.Types modules; the in-repo
generator, Lettermint.Models, the operations manifest and
Lettermint.MessageTag are removed. Requires Erlang/OTP 25+.
BREAKING CHANGE: Lettermint.email/2, Lettermint.api/2, Lettermint.Email,
Lettermint.API, Lettermint.Models, Lettermint.Model, Lettermint.MessageTag and
%Lettermint.Error{} are removed; see UPGRADE.md.
The spec at lettermint/lettermint@0b4ecbdd23 (main, the #2582 merge) is identical to the previous pin; only the generated file headers change.
Bjornftw
approved these changes
Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A new major version, following the Lettermint SDK design agreed for all languages. The reference is the Node.js SDK 3.0 (lettermint/lettermint-node#36). Sending holds no state on the client, types are generated from the published API spec, and every SDK passes the same conformance suite.
What changes
sendingTokenand/orteamToken. A single token string is detected by prefix:lm_team_is a team token,lm_plus letters and digits is a sending token, and anything else is a config error. Each part uses its own token and never falls back to the other.emails.send(message, options),emails.sendBatch(…)and an immutable per-messagecompose()builder. The idempotency key is a per-call option. Attachments are objects.0b4ecbdd23) using its names. Enums are open, so new API values never break decoding.verify(rawBody, headers)requires bothX-Lettermint-SignatureandX-Lettermint-Delivery, accepts any matchingv1, uses a ±300 s tolerance, and keys the HMAC on the secret as-is. Reason codes are the same in every SDK.Specific to this SDK
mix.exsstill said1.0.0.{:ok, _}/{:error, exception}; lists stream viaiterate.inspect, includingstructs: false.Verification
--strict. The Hex 1.0.0 fails 5.Release
Publish a GitHub release
v2.0.0. It publishes the first release since 1.0.0 to Hex.Docs for all SDK majors: lettermint/lettermint#2594 (stacked on lettermint/lettermint#2590). Merge it after the releases.
🤖 Generated with Claude Code