Postfix 发送 html 电子邮件而不定义 mime-type

发布于 2024-10-30 08:14:07 字数 274 浏览 5 评论 0原文

在 Rails 应用程序中,当在我的开发计算机上发送电子邮件时,html 电子邮件在查看时看起来与预期一致,因为当查看电子邮件的原始版本时,可以看到 html 和纯文本都嵌套在正确的 mimetype 中,而 html正常查看时可以正确渲染。

实时服务器的行为有所不同。只发送html,没有定义mime类型,导致邮件显示大量html。

我在服务器和我的开发机器上运行最新版本的 archlinux,并且 postfix 也在每台机器上运行作为邮件服务器。

有什么想法可能导致这种差异吗?

In a rails app when sending out emails on my development machine the html emails look as expected when viewed, in that both the html and plain text can been seen nested in the proper mimetype when the raw version of the email is viewed, while the html renders properly when viewed normally.

The live server behaves differently. Only the html is sent and the mime type is not defined, which results in the email displaying a lot of html.

I am running up to date versions of archlinux on both the server and my dev machine, with postfix also running on each machine as the mail server.

Any ideas of what could be causing this difference?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

笑脸一如从前 2024-11-06 08:14:07

你可能应该运行 vagrant 和 puppet/chef。然后你就可以发现了。

You should probably be running vagrant and puppet/chef. Then you can find out.

懷念過去 2024-11-06 08:14:07

我曾尝试重新启动 postfix 守护进程,但这似乎没有帮助。一旦流量消失,我重新启动服务器,一切就正常了。从未对任何配置设置进行任何更改,并且在本地设置和远程设置之间进行差异显示没有差异。

所以我对为什么事情会这样发展一无所知。

I had tried restarting the postfix daemon, but that didn't seem to help. Once traffic died down I restarted the server and things worked. There were never any changes made to any of the configuration settings and doing a diff between my local settings and the remote showed no differences.

So I don't have the slightest clue to why things were behaving the way they were.

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