PHP 邮件发送的电子邮件对于某些但不是全部是未编码的

发布于 2024-12-25 13:34:44 字数 1013 浏览 0 评论 0原文

我一直通过 PHP 邮件从 osCommerce 网站发送电子邮件。有些人回应说收到的消息是“乱码”(他们的描述)。看看他们收到的内容,似乎与标头有关,下面是他们所看到的示例:

X-Mailer: osCommerce

Content-Type: multipart/alternative;

    boundary="=_29f52435458f0625604b0644bed12e96"


--=_29f52435458f0625604b0644bed12e96

Content-Type: text/plain; charset="iso-8859-1"

Content-Transfer-Encoding: 7bit


<email body in TEXT format goes here>

--=_29f52435458f0625604b0644bed12e96

Content-Type: multipart/related;

    boundary="=_76ef682735a0ae864990f7224bfc9522"



--=_76ef682735a0ae864990f7224bfc9522

Content-Type: text/html; charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



<email body in HTML format goes here>

--=_76ef682735a0ae864990f7224bfc9522--

--=_29f52435458f0625604b0644bed12e96--

标头似乎有问题。这个问题很难解决,因为它对某些人来说是这样的,而另一些人则不然。我已经向自己发送了测试邮件,并且我看到它应该显示。

这不是 osCommerce 问题,它过去发送时没有任何问题,我最近对其进行了调整,现在我无法将其恢复到原来的状态。我的 IDE 允许我跟踪文件中的更改,并且我已恢复了所有更改,但问题仍然存在。

问题是由两个不同的边界数引起的吗?

我正在寻找的是看看上面是否有任何异常。

I've been sending email from an osCommerce site via PHP mail. Some people have responded to say that the message received is coming in "garbled" (their description). Looking at what they received it seems that it's something with the headers, below is an example of what they are seeing:

X-Mailer: osCommerce

Content-Type: multipart/alternative;

    boundary="=_29f52435458f0625604b0644bed12e96"


--=_29f52435458f0625604b0644bed12e96

Content-Type: text/plain; charset="iso-8859-1"

Content-Transfer-Encoding: 7bit


<email body in TEXT format goes here>

--=_29f52435458f0625604b0644bed12e96

Content-Type: multipart/related;

    boundary="=_76ef682735a0ae864990f7224bfc9522"



--=_76ef682735a0ae864990f7224bfc9522

Content-Type: text/html; charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



<email body in HTML format goes here>

--=_76ef682735a0ae864990f7224bfc9522--

--=_29f52435458f0625604b0644bed12e96--

It looks like there's something wrong with the headers. What's making this difficult to solve is it displays like this for some and not others. I've sent test mails to myself and I see it as it should be displayed.

This is not an osCommerce issue, it use to send with no issue, I tweaked it recently and now I can't revert it back to what it was. My IDE allows me to track changes in files, and I've reverted all of my changes but the problem still persists.

Is the problem being caused by the two different boundary numbers?

What I'm looking for is to see if anything above looks out of the ordinary.

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

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

发布评论

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

评论(1

尐籹人 2025-01-01 13:34:44

您正在以 HTML 格式发送邮件,特别是 multipart/mixed。并非所有电子邮件客户端都能够阅读 HTML 邮件。您可能想查看您的电子邮件模块,看看它是否可以以纯文本格式发送邮件。

You are sending out mail in HTML format, specifically multipart/mixed. Not all email clients are capable of reading HTML mail. You might want to look into your emailing module to see if it can send out mail in plaintext format.

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