Php 通过aws发送电子邮件是否只需要AccessKey和SecretKey?
我使用此依赖项通过AWS发送电子邮件,但我不知道在哪里可以设置主机、用户名、端口和密码。有没有办法设置它?有人知道如何使用这个php aws ses吗?该软件可能通过php SDK连接到Amazon ses,而不是将其视为SMTP服务器。因此,只需要AWS凭证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 *
然而,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;
}