我可以通过在邮件程序中定义id来向一个电子邮件ID发送电子邮件,但是当用户在表单中键入“mssage and email 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 , Another User
更新:
标签:php,email
来源: https://codeday.me/bug/20190726/1545745.html