Add SMTP.com email provider - #55
Merged
Merged
Conversation
eelcoj
force-pushed
the
add-smtpcom-provider
branch
from
August 31, 2026 11:17
74ee42d to
a69e992
Compare
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.
Adds SMTP.com as a transactional email provider.
Posts to
https://api.smtp.com/v4/messages. Their payload differs from the other providers: recipients live underrecipients, senders underoriginator, addresses use anaddresskey instead ofemail, and the content is an array of MIME parts underbody.parts.SMTP.com requires a sender
channelon every request, so it is exposed as a provider option (config.providers.smtpcom.channel) and raises a clearCourrier::ArgumentErrorwhen missing, following the Loops pattern.Base64 is done with
Array#pack("m0")rather thanBase64.strict_encode64, to avoid adding thebase64bundled gem as a dependency on Ruby 3.4+.lib/courrier/email/providers/smtpcom.rb— the providerlib/courrier/email/provider.rb— require + registry entryREADME.md— provider list plus thechannelconfiguration exampletest/courrier/email/providers/smtpcom_test.rb— body formatting, auth header, registry lookup, dropped optional fields, and the missing-channelerrorFull suite passes locally: 105 runs, 200 assertions, 0 failures, 0 errors, 0 skips.
Part of #35 — ticks the SMTP.com box.
Three things worth flagging for review:
Authorization: Basic base64("api:<key>")scheme comes from their official PHP SDK (SmtpSdk\HttpClient\HttpRequest), not from the docs. Worth confirming against a live account."encoding" => "base64"with encoded content — as the unambiguous reading.smtpcom/Smtpcomfor consistency with the existingSmtp2go. Happy to rename if you'd prefer something else.