简体   繁体   English

Drupal Webform HTML Email 在开发盒上正常,部署到服务器时显示文本

[英]Drupal Webform HTML Email fine on Dev box, Text when deployed to server

Using Drupal 9.2.7 and Webform 6.1.2, I got the webform and html email working well on my dev machine.使用 Drupal 9.2.7 和 Webform 6.1.2,我得到了 webform 和 html email 在我的开发机器上运行良好。 I am running WSL2 on Windows, and using Mailhog to validate the emails without an SMTP server.我在 Windows 上运行 WSL2,并使用 Mailhog 验证没有 SMTP 服务器的电子邮件。 All looked good.一切看起来都很好。

I copied the project to my test domain on A2Hosting and the emails come through as plain text.我将项目复制到 A2Hosting 上的测试域,电子邮件以纯文本形式发送。

I then installed Mail System and Mime Mail thinking that might be the problem.然后我安装了 Mail System 和 Mime Mail,认为这可能是问题所在。 Mail hog shows nice emails in either the html or text version, but when sent from A2Hosting I see the text version and raw html in the same email. Mail hog 在 html 或文本版本中显示了不错的电子邮件,但是当从 A2Hosting 发送时,我在同一个 email 中看到了文本版本和原始 html。 My email client (eM Client) say the email is in html format.我的 email 客户端(eM 客户端)说 email 是 html 格式。

Unfortunately I do not have another place I can test this.不幸的是,我没有其他地方可以对此进行测试。 Could Mailhog be hiding a configuration problem on my part or is there a chance A2Hostings mail system is mucking it up? Mailhog 是否隐藏了我的配置问题,或者 A2Hostings 邮件系统是否有可能将其搞砸?

The solution turned out to be quite simple.结果证明解决方案非常简单。 I removed Mime Mail and Mail System, installed SMTP module, pointed it at an email account in my domain, and everything worked just as expected.我删除了 Mime 邮件和邮件系统,安装了 SMTP 模块,将其指向我域中的 email 帐户,一切都按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM