Instead of using Composer for AWS SES I installed the files from a zip file and included them as per the documentation: require '/path/to/aws-autoloader.php';
The problem is all the code examples assume you're using Composer, so I'm trying to find the alternative to things like:
use Aws\Ses\SesClient;
use Aws\Exception\AwsException;
EDIT:
The full code looks like:
use Aws\Ses\SesClient;
use Aws\Exception\AwsException;
//Create a SESClient
$SesClient = new SesClient([
'profile' => 'default',
'version' => '2010-12-01',
'region' => 'us-east-1'
]);
When I remove the "use" lines I get the error: Class 'SesClient' not found
I guess I'm missing what "use" does and how to replicate that outside of Composer. The autoloader file has a $mapping array:
$mapping = array(
'JmesPath\FnDispatcher' => __DIR__ . '/JmesPath/FnDispatcher.php',
... etc)
And then below that array:
spl_autoload_register(function ($class) use ($mapping) {
if (isset($mapping[$class])) {
require $mapping[$class];
}
}, true);