0

在为 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

有什么想法吗?

4

1 回答 1

0

检查电子邮件配置。您可以设置换行符。默认为\n。

$config['newline'] = "\r\n"
于 2012-05-02T03:12:29.017 回答