PHPMailer SMTP is a module for sending email via an external SMTP service using the latest PHPMailer library. The aim is for a well maintained and lean SMTP-only module which is RFC compliant. It also has some advanced SMTP configuration options.

There is a list of similar modules on the project page and how they differ. This module does one thing and it does it well. Any bugs and RFC violations will be fixed very quickly.

Similar Projects

Unfortunately this module does duplicate some functionality of other modules, which I understand can work against this application.

PHPMailer

https://www.drupal.org/project/phpmailer

Initially I was working on cleaning up the PHPMailer module. The Drupal 8 version is no longer maintained and I couldn't get hold of a relevant maintainer via the issue queue or their contact form.

I also wanted a slight change in direction from what PHPMailer currently does, simplifying the process by removing non-SMTP related features. For example, I removed direct support for MIME Mail module and added Mail System module as a requirement.

Open issues: https://www.drupal.org/project/issues/phpmailer?version=8.x
Contrib tracker: #2626280: [phpmailer] PHPMailer
Information request: #3092635: PHPMailer Module Status

SMTP Authentication

https://www.drupal.org/project/smtp

Does more than just SMTP. It includes a hacked version of the PHPMailer library module, a situation which is unlikely to change: #2711559-35: Set phpMailer as a external library using composer (and update it to 6.0)

Project link

https://www.drupal.org/project/phpmailer_smtp

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/phpmailer_smtp.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-phpmailer_smtp...

Comments

imclean created an issue. See original summary.

imclean’s picture

Issue summary: View changes

Add information regarding similar projects.

imclean’s picture

Issue summary: View changes
imclean’s picture

Status: Needs review » Needs work

Missing some DI.

imclean’s picture

Status: Needs work » Active

Improved dependency injection, cleaned up some code.

imclean’s picture

Status: Active » Needs review
imclean’s picture

Issue summary: View changes
imclean’s picture

Issue summary: View changes
avpaderno’s picture

Issue summary: View changes
crafter’s picture

1. In my opinion you should add configuration schema to your module.
2. It shouldn't be here in lower case and here
3. You should use DI here?

imclean’s picture

Status: Needs review » Needs work

Thanks for the review.

  1. Will do.
  2. The property exists in PHPMailer/PHPMailer which this class extends. I'm matching the case used in the parent class.
  3. Will do. There's another which could also benefit from the injected config factory.
avpaderno’s picture

Status: Needs work » Closed (won't fix)

(I clicked on the wrong project link.)

avpaderno’s picture

Status: Closed (won't fix) » Needs work
imclean’s picture

Status: Needs work » Needs review
  1. Done.
  2. See #11.
  3. Done.
imclean’s picture

To preserve history, point 3 was referring to this line: https://git.drupalcode.org/project/phpmailer_smtp/blob/ab564e9fe3d0a24a4...

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for you contribution!

  1. SettingsForm: class comment is wrong, probably copy pasta?
  2. rfcDate(): why do you wrap it? Please add a code comment.

Otherwise looks good to me, did not see any security issues.

imclean’s picture

  1. Looks like it. Fixed.
  2. Comment added.
avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Reviewed & tested by the community » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

imclean’s picture

Thanks everyone for taking the time to review the code. It has been very useful for me.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.