Open alikuru opened 5 years ago
I just tried and I get exactly the same error as you did.
git clone https://github.com/humanmade/aws-ses-wp-mail.git aws-ses-wp-mail
cd aws-ses-wp-mail
composer install
The plugin is active and the constants are set in wp-config.php
OK, added this line on the top for composer
auto-loading and now I am able to send with wp-cli
:
require_once dirname( __FILE__ ) . '/vendor/autoload.php';
In a previous version the AWS autoloader was required in SES::get_client(). This was removed when the SDK was removed
This was intentionally removed in https://github.com/humanmade/aws-ses-wp-mail/pull/41 as it wasn't easy to keep it up to date.
The ideal approach is to install plugins like this via composer, rather than installing composer dependencies per plugin e.g.:
composer require humanmade/aws-ses-wp-mail
Then you could include your project's root level vendor/autoload.php
in wp-config.php
for example. This means if you have multiple plugins making use of the AWS SDK (such as S3 Uploads) it only needs one shared copy of the SDK in your codebase.
Updated
wp-config.php
and rancomposer install
; getting this error while testing withwp-cli
:Any ideas what am I doing wrong?