The website encountered an unexpected error. Please try again later. after sending test email

Created on 23 March 2023, over 1 year ago

Problem/Motivation

After installing via composer, adding API key and go to test page, when I send test email i got the error in title, here mi log:

Error: Class "SendGrid\Mail\Mail" not found in Drupal\sendgrid_integration\Plugin\Mail\SendGridMail->doMail() (line 169 of /var/www/clients/client1/web1/web/modules/contrib/sendgrid_integration/src/Plugin/Mail/SendGridMail.php)
#0 /var/www/clients/client1/web1/web/modules/contrib/sendgrid_integration/src/Plugin/Mail/SendGridMail.php(147): Drupal\sendgrid_integration\Plugin\Mail\SendGridMail->doMail()
#1 /var/www/clients/client1/web1/web/modules/contrib/mailsystem/src/Adapter.php(50): Drupal\sendgrid_integration\Plugin\Mail\SendGridMail->mail()
#2 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Mail/MailManager.php(307): Drupal\mailsystem\Adapter->mail()
#3 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Mail/MailManager.php(180): Drupal\Core\Mail\MailManager->doMail()
#4 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Mail\MailManager->Drupal\Core\Mail\{closure}()
#5 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Mail/MailManager.php(181): Drupal\Core\Render\Renderer->executeInRenderContext()
#6 /var/www/clients/client1/web1/web/modules/contrib/mailsystem/src/MailsystemManager.php(70): Drupal\Core\Mail\MailManager->mail()
#7 /var/www/clients/client1/web1/web/modules/contrib/sendgrid_integration/src/Form/SendGridTestForm.php(168): Drupal\mailsystem\MailsystemManager->mail()
#8 [internal function]: Drupal\sendgrid_integration\Form\SendGridTestForm->submitForm()
#9 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Form/FormSubmitter.php(114): call_user_func_array()
#10 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Form/FormSubmitter.php(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers()
#11 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Form/FormBuilder.php(595): Drupal\Core\Form\FormSubmitter->doSubmitForm()
#12 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Form/FormBuilder.php(323): Drupal\Core\Form\FormBuilder->processForm()
#13 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#14 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#15 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#16 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#18 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#19 /var/www/clients/client1/web1/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#20 /var/www/clients/client1/web1/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#21 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#22 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#23 /var/www/clients/client1/web1/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#24 /var/www/clients/client1/web1/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#25 /var/www/clients/client1/web1/web/modules/contrib/services/src/StackMiddleware/FormatSetter.php(44): Drupal\page_cache\StackMiddleware\PageCache->handle()
#26 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\services\StackMiddleware\FormatSetter->handle()
#27 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#28 /var/www/clients/client1/web1/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#29 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#30 /var/www/clients/client1/web1/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#31 {main}
.

Steps to reproduce

from a command line: composer require 'drupal/sendgrid_integration:^2.1' or composer require 'drupal/sendgrid_integration:^2.1' -W
Go to yourwebsite/admin/modules and enable it; go to yourwebsite/admin/config/services/sendgrid and insert your API key, hit save, after you get the confirmation status message, got to yourwebsite/admin/config/services/sendgrid/test fill up the field and hit "Send test message", you got the error.

Drupal 9.5.5
PHP 8.1.17
OS: Debain Linux 11 amd64

💬 Support request
Status

Active

Version

2.1

Component

Code

Created by

🇮🇹Italy Niubbo75

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

Comments & Activities

Production build 0.69.0 2024