Does sending an email through aws require only AccessKey and SecretKey?

Viewed 38

im using this dependency https://github.com/daniel-zahariev/php-aws-ses to send email through AWS and i don't see where can I set host, username, ports and password. is there a way to set it does anyone know how to usethis php-aws-ses?

2 Answers

The software probably connect to Amazon SES via the PHP SDK rather than treating it as an SMTP server. Therefore, only AWS credentials are required.

However, Amazon SES starts in a "sandbox" mode. You can only send emails to verified addresses. You will need to request to Move out of the Amazon SES sandbox - Amazon Simple Email Service when sending to "outside" recipients.

Yes, you specify accessKey and secretKey here:

    /**
     * Constructor
     *
     * @param string $accessKey Access key
     * @param string $secretKey Secret key
     * @param string $host Amazon Host through which to send the emails
     * @param boolean $trigger_errors Trigger PHP errors when AWS SES API returns an error
     * @param string $requestSignatureVersion Version of the request signature
     *               Currently only V4 supported by AWS. Keeping parameter for BW compatibility reasons.
     */
    public function __construct($accessKey = null, $secretKey = null, $host = self::AWS_US_EAST_1, $trigger_errors = true, $requestSignatureVersion = self::REQUEST_SIGNATURE_V4) {
        if ($accessKey !== null && $secretKey !== null) {
            $this->setAuth($accessKey, $secretKey);
        }
        $this->__host = $host;
        $this->__trigger_errors = $trigger_errors;
        $this->__requestSignatureVersion = $requestSignatureVersion;
    }
Related