Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 通过aws发送电子邮件是否只需要AccessKey和SecretKey?_Php_Amazon Web Services_Amazon Ses - Fatal编程技术网

Php 通过aws发送电子邮件是否只需要AccessKey和SecretKey?

Php 通过aws发送电子邮件是否只需要AccessKey和SecretKey?,php,amazon-web-services,amazon-ses,Php,Amazon Web Services,Amazon Ses,我使用此依赖项通过AWS发送电子邮件,但我不知道在哪里可以设置主机、用户名、端口和密码。有没有办法设置它?有人知道如何使用这个php aws ses吗?该软件可能通过php SDK连接到Amazon ses,而不是将其视为SMTP服务器。因此,只需要AWS凭证 然而,AmazonSES以“沙箱”模式启动。您只能向已验证的地址发送电子邮件。发送给“外部”收件人时,您需要向请求。是,您可以指定accessKey和secretKey: /** * Constructor *

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

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


然而,AmazonSES以“沙箱”模式启动。您只能向已验证的地址发送电子邮件。发送给“外部”收件人时,您需要向请求。

是,您可以指定
accessKey
secretKey

    /**
     * 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;
    }