Email.php新行不起作用

Jon*_*Doe 0 php email

我用它来发送注册电子邮件:

sendMail($this->input->post('register_email'), $this->config->item('activation_sender_mail'), $this->config->item('server_name').'Account Creation', 'Hey '.$this->input->post('register_username').'r\n Thank you for your interest in contributing to the site.\r\n Just click this link to activate your account:\r\n <a href="'.$link.'">'.$link.'</a>');
Run Code Online (Sandbox Code Playgroud)

但我收到的邮件是:

嗨用户!感谢您有兴趣为该网站做出贡献.只需点击此链接即可激活您的帐户:链接

我想看起来像:

Hey user!
Thank you for you interest in contributing to the site.
Just click this link to activate your account:
link
Run Code Online (Sandbox Code Playgroud)

Ben*_*enM 5

\r\n用于发送纯文本.由于您<a>在代码中包含了一个元素,因此我假设您正在发送HTML电子邮件.

如果是这种情况,请使用<p>标记格式化内容或<br />使用新行.