Rackspace Cron Job 电子邮件中的换行符

发布于 2024-09-04 15:39:03 字数 274 浏览 4 评论 0原文

我正在对 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

很糊涂小朋友 2024-09-11 15:39:03

这似乎是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文