gpt4 book ai didi

php邮件多个收件人

转载 作者:可可西里 更新时间:2023-11-01 00:17:38 26 4
gpt4 key购买 nike

我可以通过在邮件程序中定义 id 来向一个电子邮件 id 发送电子邮件,但是当用户在表单中键入“消息和电子邮件 id”时,我无法理解如何发送给多个收件人。例如 - 我正在展示一个包含两个文本区域的表单 - 一个用于电子邮件 ID,一个用于自定义消息。因此,当他们单击发送时,我想从该文本区域获取电子邮件 ID,并将该消息发送到这些 ID。我还没有弄清楚如何用逗号/空格分隔电子邮件,但会在谷歌搜索中尝试。

谢谢

最佳答案

mail() 函数的 to 参数的文档指出:

Receiver, or receivers of the mail.

The formatting of this string must comply with » RFC 2822. Some examples are:

* user@example.com
* user@example.com, anotheruser@example.com
* User <user@example.com>
* User <user@example.com>, Another User <anotheruser@example.com>

http://php.net/manual/en/function.mail.php

更新:

我看到了这个关于使用 PHP 发送邮件的很棒的教程: http://articles.sitepoint.com/article/advanced-email-php

关于php邮件多个收件人,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3296026/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com