Amazon SES设置无法使用codeigniter

时间:2015-05-07 06:12:58

标签: php codeigniter email amazon-web-services amazon-ses

我正在使用带有codeigniter的Amazon SES。这些是我的(非工作)SES配置文件:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Config for the Amazon Simple Email Service library
 *
 * @see ../libraries/Amazon_ses.php
 */
//$this->load->library('curl');
$config['amazon_ses_secret_key'] = 'sdsdfsdfsdfsdfsfdsdfsdfsdfsdfsdfs';
$config['amazon_ses_access_key'] = 'sdfsdfsdfsdfsdfsdbds';

// Adresses
$config['amazon_ses_from'] = 'krishmadusanka1988@gmail.com';
$config['amazon_ses_from_name'] = 'krishantha';
$config['amazon_ses_reply_to'] = 'krishmadusanka1988@gmail.com';

// Path to certificate to verify SSL connection (i.e. 'certs/cacert.pem') 
$config['amazon_ses_cert_path'] =  'certs/cacert.pem';

// Charset to be used, for example UTF-8, ISO-8859-1 or Shift_JIS. The SMTP
// protocol uses 7-bit ASCII by default
$config['amazon_ses_charset'] = '';

我的控制器是:

$this->load->library('amazon_ses');

        // Configure and send email

        $this->amazon_ses->to('krishantha@fclanka.com');
        $this->amazon_ses->subject('Open me!');
        $this->amazon_ses->message('<strong>Use HTML</strong>');
        $this->amazon_ses->debug(TRUE);
        if ($this->amazon_ses->send()) {

            echo "Successfully sent!";
        } else {

            echo "Failure!";
        }

当我使用它时不会出现任何错误,但它无法正常工作。

0 个答案:

没有答案