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



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

是的,您在此处指定accessKeysecretKey

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

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

然而,亚马逊SES以";沙箱";模式您只能将电子邮件发送到已验证的地址。当发送到"时,您需要请求搬出亚马逊SES沙箱-亚马逊简单电子邮件服务;外部";收件人。

最新更新