spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

ERROR: Class 'Aws\Ses\SesClient' not found #267

Closed gilbitron closed 3 years ago

gilbitron commented 3 years ago

Describe your issue

I've just set up a fresh install of Mailcoach using the DO 1-click installer and configured SES. When I try to send a test email I get a 500 error. The logs show this:

[2020-10-29 15:19:45] production.ERROR: Class 'Aws\Ses\SesClient' not found {"userId":1,"exception":"[object] (Error(code: 0): Class 'Aws\\Ses\\SesClient' not found at /var/www/html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php:272)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php(175): Illuminate\\Mail\\MailManager->createSesTransport()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php(151): Illuminate\\Mail\\MailManager->createTransport()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php(119): Illuminate\\Mail\\MailManager->createSwiftMailer()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php(94): Illuminate\\Mail\\MailManager->resolve()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php(72): Illuminate\\Mail\\MailManager->get()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Mail\\MailManager->mailer()
#6 /var/www/html/vendor/spatie/mailcoach-ui/src/Http/App/Controllers/Settings/MailConfiguration/SendTestMailController.php(25): Illuminate\\Support\\Facades\\Facade::__callStatic()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(48): Spatie\\MailcoachUi\\Http\\App\\Controllers\\Settings\\MailConfiguration\\SendTestMailController->sendTestEmail()

Any ideas?


Health check:

Environment: production Debug: OFF Horizon: Active Queue connection: OK Webhooks: 1 unprocessed webhooks Schedule: ran 0 minute(s) ago Default mailer: mailcoach Mailcoach mailer: null Campaign mailer: null Transactional mailer: null

Technical details

App directory: /var/www/html User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0 PHP version: 7.4.10 MySQL version: 5.7.32-0ubuntu0.18.04.1 Laravel version: 8.12.0 Horizon version: v5.3.0@2d6e60011c3d58c86a6c38f03374167bb1232a0a laravel-mailcoach version: 3.2.8 mailcoach-ui version: 1.0.3

gilbitron commented 3 years ago

This was fixed by requiring the aws/aws-sdk-php package. Not sure why this isn't installed in the first place?

riasvdv commented 3 years ago

This has been added in the starter project https://github.com/spatie/Mailcoach/releases/tag/3.0.3 new 1-click installs and composer create-project installs will have the AWS driver added by default.