Please let me share with you some steps on how to migrate from Swift Mailer to Drupal Symfony Mailer.
1. Install Drupal Symfony Mailer
- Install the Drupal Symfony Mailer module.
- Add an SMTP transport (postmark) here: /admin/config/system/mailer/transport. If Swift Mailer is still enabled, Drupal Symfony Mailer should have imported that config automatically.
- You can remove the sendmail transport that Drupal Symfony Mailer created because we don't need it.
- No further configuration is needed for a simple setup. Read this page and this page for more information. The last page explains the 3 levels of compatibility the module provides.
2. Remove Swift Mailer
- Swift Mailer depends on Mail System. So before you remove Swift Mailer you should add Mail System explicitly to your composer.json with "composer require".
- Uninstall Swift Mailer and Mail System and export config.
- Commit & push changes to Git and deploy the changes to the production site.
- Remove Mail System via composer.
- Commit & push changes to Git.
- Deploy to production again.