我创建了一个使用Codeigniter发送邮件的功能。但我收到电子邮件但网页无法加载。请帮我。如果我删除$ options和function,它可以加载页面
$options = array(
'currentMail' => 1,
'title' => 'tretretretetre dfg dsfsdfsf',
'toEmail' => 'abc@gmail.com',
'content' => 'fds fds fds dsfdsds fds fdsfds fdsf ds',
);
$this->load->library('email');
$currentMail = $options['currentMail'];
$mail = $this->p_model->GetInfoEmail($currentMail);
$cf = $this->p_model->GetConfigEmail($currentMail);
$config = Array(
'protocol' => $cf['mail_type_protocol'],
'smtp_port' => (int)$cf['mail_type_smtp_port'],
'smtp_host' => $cf['mail_type_smtp_host'],
'smtp_user' => $mail['mail_user'],
'smtp_pass' => $mail['mail_password'],
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_mailtype("html");
$emailSend = 'no-reply@'.$_SERVER['SERVER_NAME'];
$this->email->from($emailSend, $options['title']);
$this->email->to($options['toEmail']);
if($options['cc'])
$this->email->cc($options['cc']);
$this->email->subject($options['title']);
$this->email->message($options['content']);
$this->email->send();
$this->load->view('index');