【发布时间】:2012-02-15 12:04:33
【问题描述】:
我正在开发一个基于 Codeigniter 的网站,当人们收到邮件时,我需要向他们发送电子邮件 正在注册。我的服务器托管在 Amazon EC2 上。
我正在尝试使用他们的 Amazon Simple Email Service,并且我正在使用以下库来 让它工作。我没有收到错误,但发送失败。我目前处于沙盒模式,所以我只能发送(当它工作时)到我注册的电子邮件地址,但这也失败了。
我已经使用我的 AWS 凭证配置了库。有什么问题?
这是我正在使用的库:
https://github.com/joelcox/codeigniter-amazon-ses
这是我的控制器代码:
// Load the Library
$this->load->library('amazon_ses');
// Configure and send email
$this->amazon_ses->to('registered@email.com');
$this->amazon_ses->subject('Open me!');
$this->amazon_ses->message('<strong>Use HTML</strong>');
if ($this->amazon_ses->send()) {
echo "Successfully sent!";
} else {
echo "Failure!";
}
$this->amazon_ses->debug(TRUE);
【问题讨论】: