通过aws发送邮件只需要AccessKey和SecretKey吗?

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

我正在使用此依赖项 https://github.com/daniel-zahariev/php-aws-ses 通过 AWS 发送电子邮件,但我看不到在哪里可以设置主机、用户名、端口和密码。有没有办法设置它有人知道如何使用这个 php-aws-ses 吗?

该软件可能通过 PHP SDK 连接到 Amazon SES,而不是将其视为 SMTP 服务器。因此,只需要 AWS 凭据。

但是,Amazon SES 以“沙盒”模式启动。您只能向经过验证的地址发送电子邮件。发送给“外部”收件人时,您需要请求 Move out of the Amazon SES sandbox - Amazon Simple Email Service

是的,您指定 accessKeysecretKey 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;
    }