无法从 php 通过电子邮件发布到 Facebook 页面
您可以将状态更新发送到您拥有的 Facebook 页面,方法是将其发送到一个白痴(秘密)电子邮件地址。这是在这里描述的: http://www.facebook.com/help/pages/mobile 问题是我无法使其从 php 工作,
function page_publish_by_mail($page_mail, $status){
$to = $page_mail;
$subject = $status;
$message = "";
$headers = "From: [email protected]";
return mail($to, $subject, $message, $headers);
}
我可以将邮件发送到我的电子邮件地址,并且我可以从我的电子邮件地址通过邮件发布,但我似乎无法从 PHP 通过邮件发布。
you can send a status update to a facebook page you own by sending it to a cretin (secret) email address. this is described here:
http://www.facebook.com/help/pages/mobile
the problem is I cant make it work from php
function page_publish_by_mail($page_mail, $status){
$to = $page_mail;
$subject = $status;
$message = "";
$headers = "From: [email protected]";
return mail($to, $subject, $message, $headers);
}
I can send mail to my email address and I can post by mail from my email address but I can't seem to post by mail from PHP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我以前没有尝试过发送到 Facebook 邮件,但我觉得它由于缺少标题信息而被过滤掉。尝试添加更多标题详细信息。
我总是发送这样的标头:
这设置为发送 html 电子邮件,但如果这不起作用,您可以尝试其他内容类型。
查看文档并查看是否还需要其他标头可能是个好主意。
I haven't tried to send to facebook mail before, however I feel like it is being filtered out due to lack of header information. Try adding some more header details.
I always send headers like this:
This is set up to send an html email, but you might try other content-types if that doesn't work.
It may be a good idea to look in the documentation and see if there are other headers that are required as well.