Problem/Motivation

I would like to use Webform in Drupal 9.0.6

Steps to reproduce

I upgraded my site from D8.9.6. After doing this, I got error:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "phpmailer" plugin does not exist. Valid plugin IDs for Drupal\mailsystem\MailsystemManager are: swiftmailer, webform_php_mail, php_mail, test_mail_collector in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Proposed resolution

I uninstalled all the addons

 Webform Access
    Webform Attachment
    Webform iCheck
    Webform Image Select
    Webform Location Geocomplete
    Webform Submission Export/Import
    Webform Submission Log
    Webform Templates
    Webform UI
    Webform Node

which did not help. Finally, after I uninstalled Webform itself (in the GUI) Status Report started working again. I tried this procedure twice, hoping that an uninstall and reinstall would fix it. It did not.
Note that the phpmailer library is installed both in vendor/phpmailer and in libraries.

Remaining tasks

Why does Webform require the phpmailer plugin?
Where is Webform looking for it?

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 3175586-4.patch586 bytesjrockowitz

Comments

tjtj’s picture

tjtj created an issue.
I have other D9.0.6 installations with webform installed that do not do this!

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)

Do you have the phpmailer.module installed?

You might need to uninstall it before upgrading to D9

tjtj’s picture

the phpmailer module is NOT installed. But phpmailer/phpmailer is installed--required by other things.
It was installed in D8, but I uninstalled it. Why is Webform triggering this?
Actually, uninstalling phpmailer in Drupal 8 triggers this exception when Status Report is run so long as Webform is installed. Uninstalling Webform removes trhe error, but I need Webform, and phpmailer seems to be abandoned.

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new586 bytes

The \Drupal\webform\WebformEmailProvider tracks which mail system is being used so that HTML email and attachments can be handled correctly.

You probably need to update your system.mail.yml settings and remove the reference to phpmailer

The attached patch tries to more gracefully handle this issue.

  • jrockowitz authored a3517a7 on 8.x-5.x
    Issue #3175586 by jrockowitz: Installing Webform creates PluginNotFound...
jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz authored a3517a7 on 6.x
    Issue #3175586 by jrockowitz: Installing Webform creates PluginNotFound...
tjtj’s picture

The patch seems to work!

Status: Fixed » Closed (fixed)

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