在准备CodeIgniter电子邮件类的消息时,我似乎做错了什么。我有以下代码:
$message = "Registration Confirmation and Receipt";
$message .= "\r\n";
$message .= "Thank you for registering for MAGIC Live. Your credit card receipt and a complete confirmation of your registration is below. Please keep it for your records.\r\n";
$message .= "\r\n";
$message .= "Credit card: XXXX XXXX XXXX ".$group['last4'];
$message .= " Exp: ".$group['exp_month']."/".$group['exp_year']."\r\n";
$message .= "data";
$this->email->message($message);
彼此相邻的只有两组换行符似乎生效。输出的电子邮件如下所示:
Registration Confirmation and Receipt Thank you for registering for MAGIC Live. Your credit card receipt and a complete confirmation of your registration is below. Please keep it for your records.
Credit card: XXXX XXXX XXXX 4242 Exp: 3/2015 data
有什么想法吗?
答案 0 :(得分:0)
检查电子邮件配置。您可以设置换行符。默认为\ n。
$config['newline'] = "\r\n"