Rackspace Cron Job 电子邮件中的换行符
我正在对 Rackspace 上托管的多个数据库运行备份。这工作正常。我遇到的问题是结果电子邮件。我正在使用 Response.Write 将消息写入网页,该消息用于日志记录,并且也由作业发送的结果邮件消耗。问题是我似乎无法在日志消息之间出现换行符。服务器上存储的日志文件是正确的,但电子邮件中仅显示第一个换行符。
邮件是纯文本格式,所以我尝试使用“\n”和System.Environment.Newline,但都不起作用。我也尝试过使用
但没有成功。
有人有什么想法吗?
I'm running backups against multiple databases hosted at Rackspace. This is working fine. The problem I'm running into is with the results email. I'm using Response.Write to write a message to the web page which is used for logging and is also consumed by the results mail sent out by the job. The problem is I can't seem to get newlines to appear between log messages. The logfile stored on the server is correct, but only the first newline shows up in the email.
The mail is in Plain Text format so I tried using "\n" and System.Environment.Newline and neither work. I also tried using <br/>
with no luck.
Does anybody have any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这似乎是 Outlook 聪明地删除“额外”换行符的问题。
这 post 似乎提供了一种强制 Outlook 显示换行符的解决方案。使用
\r\n
而不是仅\n
。This appears to be an issue with Outlook being clever and removing 'extra' line breaks.
This post appears to provide a solution to force Outlook to display the line breaks. Use
\r\n
instead of just\n
.