explaingit

swiftmailer/swiftmailer

9,459PHPAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

An archived PHP library for sending email from web applications, now end-of-life since November 2021, the same team's Symfony Mailer is the officially recommended replacement for new and existing projects.

Mindmap

mindmap
  root((repo))
    Status
      End of life 2021
      No active support
    Replacement
      Symfony Mailer
      Same team built it
    Original features
      Compose messages
      Connect mail servers
      Deliver email
    License
      MIT permissive
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Migrate a legacy PHP project that uses Swift Mailer to Symfony Mailer using the migration guide

USE CASE 2

Reference the original API design to understand how to port email-sending code to a modern library

Tech stack

PHP

Getting it running

Difficulty · easy Time to first run · 30min

Library is no longer maintained since November 2021, use Symfony Mailer for all new projects and migrations.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Swift Mailer is a PHP library for sending email from web applications. It handles the mechanics of composing messages, connecting to mail servers, and delivering email, giving developers a structured way to send mail rather than using PHP's basic built-in mail function. The library is no longer maintained. The README states plainly that support ended in November 2021 and that users should move to Symfony Mailer, which the same team developed as a replacement. Symfony Mailer covers the same use cases and adds support for modern PHP features and third-party email service providers. Beyond noting its end-of-life status and pointing to the replacement, the README does not go into detail about features or usage. The full documentation was hosted externally. The library is released under the MIT license.

Copy-paste prompts

Prompt 1
I have a PHP project using Swift Mailer that I need to migrate to Symfony Mailer. What are the key API differences in how messages are created and transports are configured?
Prompt 2
Convert this Swift Mailer code to Symfony Mailer: a Swift_Message object sent via $mailer->send(), show me the equivalent Symfony Mailer code.
Prompt 3
What are the main improvements in Symfony Mailer over Swift Mailer, and which transport should I choose for sending through Gmail or SendGrid?
Open on GitHub → Explain another repo

← swiftmailer on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.