Unable to send mail: PHPMailer class was not found.

Created on 25 July 2022, over 2 years ago
Updated 23 March 2023, over 1 year ago

Hello,

I got the following error in my logs when trying to send an e-mail through SMTP.

- Unable to send mail: PHPMailer class was not found.

I'm using Drupal 9.3.9 with smtp module version 8.x-1.0. The php version that I'm currently using is PHP 7.4. I installed the module using composer. When I'm trying to send a test e-mail on the config page of the module, it receive an email so that works.

Anyone an idea how to fix this?

🐛 Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇧🇪Belgium timme77

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.

  • 🇮🇹Italy Niubbo75

    Hi, I got the same error, I've checked like timme77 does, do the same but still have the error, what can I do?

    Drupal 9.5.5
    composer require 'drupal/smtp:^1.2'
    PHP 8.1.17
    Status Detail:
    SMTP: PHPMailer Library
    Mancante
    PHPMailer is Required for SMTP to function.
    web1@webserver-arc:~$ ls -l vendor/phpmailer/phpmailer/
    total 84
    -rw-r--r-- 1 web1 client1 2092 Mar 6 15:43 COMMITMENT
    -rw-r--r-- 1 web1 client1 2675 Mar 6 15:43 composer.json
    -rw-r--r-- 1 web1 client1 6226 Mar 6 15:43 get_oauth_token.php
    drwxr-xr-x 2 web1 client1 4096 Mar 6 15:43 language
    -rw-r--r-- 1 web1 client1 26529 Mar 6 15:43 LICENSE
    -rw-r--r-- 1 web1 client1 16429 Mar 6 15:43 README.md
    -rw-r--r-- 1 web1 client1 7584 Mar 6 15:43 SECURITY.md
    drwxr-xr-x 2 web1 client1 4096 Mar 6 15:43 src
    -rw-r--r-- 1 web1 client1 5 Mar 6 15:43 VERSION

Production build 0.71.5 2024