0
$MSG = "Dear " . $student['firstname'] . " " . $student['lastname'] . ", " . $student['class'] . " " . $student['section'] . " your userid & pass for school SIS is " . $student['username'] . " & " . $student['password'] . " Login at: " . $stu_setting['short_url'] . ", Welcome to " . $stu_setting['name'] . ".";
$skool = "Welcome to " . $stu_setting['name'] . " SIS";
$to_email = '[email protected]';
$this->CI->email->from('[email protected]');
$this->CI->email->to($to_email);
$this->CI->email->subject($skool);
$this->CI->email->message($MSG);
$this->CI->email->send();
使用https://github.com/ivantcholakov/codeigniter-phpmailer在CI發送電子郵件,但每當我試圖把它改變了隨機混合字符變量的值的電子郵件。但它會正確加載$ MSG。CodeIgniter的PHP梅勒問題
郵件截圖:https://i.stack.imgur.com/1wDkm.png
$ to_email不工作時,我使用$ to_email = $學生[「電子郵件」] –
改變CRLF值用\ r \ n它解決了我的問題的一半,但仍受到等於跡象出現 –
笨有一個內置的電子郵件庫https://www.codeigniter.com/user_guide/libraries/email.html – user4419336