$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 = 'support@digitave.com';
$this->CI->email->from('noreply@digi-sis.org');
$this->CI->email->to($to_email);
$this->CI->email->subject($skool);
$this->CI->email->message($MSG);
$this->CI->email->send();
using https://github.com/ivantcholakov/codeigniter-phpmailer for sending Email in CI, but whenever i am trying to send an email it changes the variables values in random mixed characters. but it loads $MSG correctly.
Mail Screenshot: https://i.stack.imgur.com/1wDkm.png
将crlf更改为\\ r \\ n并设置字符集UTF-8可解决此问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.