我一直关注此文档:
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
当我尝试在控制器中加载这样的lib时:
$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();
干杯。
答案 0 :(得分:0)
您还没有在系统目录中收到任何文件电子邮件