0

我一直在这里关注这个文档:

https://www.mailjet.com/docs/code/php/codeigniter

在我的配置文件夹中,我创建了一个如上所示的 php 文件,如下所示:

   <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://in.mailjet.com';
$config['smtp_port'] = '465';
$config['smtp_user'] = 'API key';
$config['smtp_pass'] = 'Pass Key';
$config['charset'] = 'utf-8';
$config['mailtype'] = 'html';
$config['newline'] = "\r\n";

?>

但我仍然收到以下错误:

An Error Was Encountered
Non-existent class: Email

当我尝试在控制器中加载这样的库时:

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

$this->email->from('your_sender@address.com', 'You');
$this->email->to('recipient@example.com');
$this->email->subject('My first email by Mailjet');
$this->email->message('Hello from Mailjet & CodeIgniter !');

$this->email->send();

干杯。

4

1 回答 1

0

您在系统目录中没有任何文件电子邮件

于 2015-04-05T15:36:46.910 回答