我想阅读我们通过codeigniter电子邮件发送的电子邮件的收据。 我无法获得如何在codeigniter邮件中使用它。 我知道我们应该使用X确认读取,但是它不能在codeigniter中使用。
public function formcomplete()
{
$appid = $this->uri->segment(3);
$datan = $this->product->fetchtransaction($appid);
$txnid = $datan[0]['txn_id'];
$email = $datan[0]['email'];
$config = array(
'protocol' => 'smtp',
'smtp_host' => 'email-smtp.eu-west-1.amazonaws.com',
'smtp_port' => 587,
'smtp_crypto' => 'tls',
'smtp_user' => 'user',
'smtp_pass' => 'pass',
'mailtype' => 'text',
'charset' => 'utf-8',
);
$datanew = array(
'firstname' => $datan[0]['firstname'],
);
$this->email->initialize($config);
$this->email->set_mailtype("html");
$this->email->set_newline("\r\n");
$this->email->set_crlf("\r\n");
$subject = "Complete Your Partially Filled Application-".$appid."";
$data['datan'] = $datanew;
$mesg = $this->load->view('email/reminder/form_complete',$data,true);
$this->email->to($email);
$this->email->AddCustomHeader( "X-Confirm-Reading-To: notifications@mymail.com" );
$this->email->from('support@mail.com','Company Email');
$this->email->subject($subject);
$this->email->message($mesg);
$this->email->send();
$baseurl = "https://www.getyourevisa.com/admin/application/view/";
$completeurl = $baseurl.$appid;
//redirect('admin/application/view/' . $appid);
echo ("<script LANGUAGE='JavaScript'>
window.alert('Form Complete Reminder Successfully Sent');
window.location.replace('$completeurl');
</script>");
}
我在下面的行中使用过,但是它不起作用,我认为应该有其他方法来编写此代码。
$this->email->AddCustomHeader( "X-Confirm-Reading-To: notifications@mymail.com" );