Missing PHPMailer is Required for SMTP to function

Created on 2 January 2021, about 4 years ago
Updated 21 June 2024, 7 months ago

Problem/Motivation

Missing PHPMailer is Required for SMTP to function. Is there clear instructions on how to get Drupal to find this library or how to installed it correctly so it works with Drupal, installed it several times but still getting this missing PHPMailer error.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

💬 Support request
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States je1

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States swatchion

    For anyone has this problem with version 8.x-1.2 after you use composer add package "phpmailer/phpmailer", just add a "\" before namespace "Drupal\smtp\Form\SMTPConfigForm" line 5 of file "smtp.info.yml", the problem is caused by the missing of root namespace.

  • 🇪🇸Spain mecmartini Málaga

    @swatchion you probaly mean on the file `smtp.routing.yml`

  • 🇫🇷France deajan

    I stumbled into that issue also.
    Having installed modules via `composer require drupal/smtp` and `composer require phpmailer/phpmailer`, I still got that error message.

    After a bit of search, I noticed that the permissions for my phpmailer folder were wrong (no webserver permissions).

    Anyway, after I changed the permissions with `chmod -R apache:apache vendor/phpmailer`, I still got the error message, but basically it should work at this step.
    Rebooting php and httpd finally got rid of the error message.

  • 🇧🇷Brazil numerabilis

    I can´t depend on Composer as I don´t have VPS.
    Why can´t I download that library and upload to lib's folder as usually?

Production build 0.71.5 2024