我已经在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
有人能帮帮我吗?
发布于 2016-01-07 21:18:01
用这个解决了问题:https://github.com/Ziggeo/php-sendgrid-parse
并禁用从Sendgrid上的设置粘贴原始数据
https://stackoverflow.com/questions/34641655
复制相似问题