【问题标题】:Cannot send email with amazon ses无法使用亚马逊 ses 发送电子邮件
【发布时间】: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);

【问题讨论】:

    标签: codeigniter amazon-ses


    【解决方案1】:
    $this->amazon_ses->debug(TRUE);
    

    在调用 ...-&gt;send() 之前应该使用该调试行,试试这个并检查 AmazonSES 的答案:

    $this->load->library('amazon_ses');
    $this->amazon_ses->to('registered@email.com');
    $this->amazon_ses->subject('Open me!');
    $this->amazon_ses->message('<strong>Use HTML</strong>');
    
    $this->amazon_ses->debug(TRUE);
    print_r( $this->amazon_ses->send() );
    

    【讨论】:

    • 谢谢!我收到错误:MissingAuthenticationToken。我已经在配置文件中设置了我的 AWS 凭证。可能缺少什么?
    • @JonathanClark 你能分享你对 cUrl 做了什么吗?
    猜你喜欢
    • 2015-08-24
    • 1970-01-01
    • 2012-06-21
    • 1970-01-01
    • 2015-06-15
    • 1970-01-01
    • 2013-05-25
    • 1970-01-01
    • 2018-04-01
    相关资源
    最近更新 更多