2

我已经在 Sendgrid 上配置了带有记录 MX 的入站电子邮件服务。接收电子邮件时,回调 URL 具有此功能:

mail("contact@example.com","New Email", "New Email from Sendgrid"); 

它工作完美,现在我需要从电子邮件中获取信息,我已经阅读了文档:

https://sendgrid.com/docs/API_Reference/Webhooks/parse.html

它说使用 POST,好的,我使用 post 来获取值:

mail("contact@example.com","New Email", $_POST['from']); 

在此模式下不起作用,返回此错误:

PHP Warning: mail() expects parameter 3 to be string, array given in    /home/user/index.php on line 6

有人可以帮帮我吗?

4

1 回答 1

1

问题解决了,这个:https ://github.com/Ziggeo/php-sendgrid-parse

并从 Sendgrid 的设置中禁用粘贴 RAW 数据

于 2016-01-07T13:18:01.283 回答