Skip to content

Update Swoosh TLS configuration for OTP26+#4605

Merged
stuartc merged 1 commit intomainfrom
4602-adjust-tls-verification
Apr 10, 2026
Merged

Update Swoosh TLS configuration for OTP26+#4605
stuartc merged 1 commit intomainfrom
4602-adjust-tls-verification

Conversation

@rorymckinley
Copy link
Copy Markdown
Collaborator

Description

This PR adds TLS options that allow Lightning to once again support TLS-protected SMTP connections ( swoosh/swoosh#785)

Closes #4602

Validation steps

  • Sign up for a free account at Mailtrap.
  • Using Lightning on main - configure mail sending to use Mailtrap:
MAIL_PROVIDER=smtp
SMTP_RELAY=sandbox.smtp.mailtrap.io
SMTP_PORT=587
SMTP_TLS=true
SMTP_USERNAME=xxxxxx
SMTP_PASSWORD=yyyyyy
EMAIL_ADMIN=sender@openfn.internal
  • Attempt to send a mail (it should fail after a while with an error):
Lightning.Mailer.deliver(
    Swoosh.Email.new(
      to: "anonnymouse@openfn.internal",
      from: {Lightning.Config.email_sender_name(), Lightning.Config.instance_admin_email()},
      subject: "Test Email",
      text_body: "This is a test email from IEx "
    )
  )
image
  • Switch to this feature branch and repeat the exercise:
Lightning.Mailer.deliver(
    Swoosh.Email.new(
      to: "anonnymouse@openfn.internal",
      from: {Lightning.Config.email_sender_name(), Lightning.Config.instance_admin_email()},
      subject: "Test Email",
      text_body: "This is a test email from IEx "
    )
  )

It should be successful and there should be a mail in your Mailtrap sandbox:

image image

Additional notes for the reviewer

In the 1920s, the BFGoodrich company introduced a line of boots with a new style of fastener that used a new style of 'separable fastener'. While these boots would not survive into modern day the fastener did and it would inherit its name from the name that BFGoodrich gave to their boots: the zipper.

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI
  • I have added an extra item that should not exist.

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR but I really did not want to.

@github-project-automation github-project-automation Bot moved this to New Issues in Core Apr 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.56%. Comparing base (baeb59a) to head (eb60cc4).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4605      +/-   ##
==========================================
+ Coverage   89.54%   89.56%   +0.02%     
==========================================
  Files         441      441              
  Lines       21355    21355              
==========================================
+ Hits        19122    19127       +5     
+ Misses       2233     2228       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rorymckinley rorymckinley self-assigned this Apr 9, 2026
@rorymckinley rorymckinley moved this from New Issues to In review in Core Apr 9, 2026
@rorymckinley rorymckinley marked this pull request as ready for review April 9, 2026 04:38
@rorymckinley rorymckinley requested review from elias-ba and stuartc April 9, 2026 04:38
@stuartc stuartc merged commit 4634d08 into main Apr 10, 2026
9 checks passed
@stuartc stuartc deleted the 4602-adjust-tls-verification branch April 10, 2026 05:46
@github-project-automation github-project-automation Bot moved this from In review to Done in Core Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

SMTP configuration issue when using TLS

2 participants