我正在尝试使用以下代码发送电子邮件 $this->load->library('email', $config);
$this->email->from('leena.nasir552@gmail.com');
$this->email->to('leena.nasir@morgan.com');
$this->email->subject('my email');
$this->email->message($message);
$result = $this->email->send() ;
echo($result) ;
if($this->email->send())
{
$params = array (
'SenderId'=> $senderId,
'ReceiverId'=> $recieverId,
'Message'=> $message,
'Status' => 'Sent' // set the statues variable to Sent if it sent successfully
);
$this->UserModel->addMessage($params);
} else {
echo $this->email->print_debugger();
$params = array (
'SenderId' => $senderId,
'ReceiverId' => $recieverId,
'Message'=> $message,
'Status' => 'failed' // set the status to failed if the message sending failed
);
$this->UserModel->addMessage($params);
}
每次我尝试发送电子邮件时都会收到此错误的问题
遇到 PHP 错误
严重性:通知
消息:未定义索引:主题
文件名:库/Email.php
行号:982
谁能帮我解决这个错误?假设这是来自 Email.php 库的第 982 行
$this->_subject = $this->_headers['Subject'];