Postfix 发送 html 电子邮件而不定义 mime-type
在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可能应该运行 vagrant 和 puppet/chef。然后你就可以发现了。
You should probably be running vagrant and puppet/chef. Then you can find out.
我曾尝试重新启动 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.