如何在 codeigniter 中使用 sendgrid 库作为第三方。在他们的网站上,我可以找到扩展普通 codeigniter 电子邮件类的 smtp 代码。有什么帮助吗?
<?php
$this->load->library('email');
$this->email->initialize(array(
'protocol' => 'smtp',
'smtp_host' => 'smtp.sendgrid.net',
'smtp_user' => 'sendgridusername',
'smtp_pass' => 'sendgridpassword',
'smtp_port' => 587,
'crlf' => "\r\n",
'newline' => "\r\n"
));
$this->email->from('your@example.com', 'Your Name');
$this->email->to('someoneexampexample@example.com');
$this->email->cc('another@another-example.com');
$this->email->bcc('them@their-example.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();
?>
梦里花落0921