doumi1944 2012-01-14 18:59
浏览 16

无法通过电子邮件从php发布到Facebook页面

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: my@mail.address";   
    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.

  • 写回答

1条回答 默认 最新

  • dongli2000 2012-01-14 21:42
    关注

    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:

    $headers  = 'From: Your Name <youremail@domain.com>' . "
    ";
    $headers .= 'Content-type: text/html' . "
    ";
    $headers .= 'MIME-Version: 1.0' . "
    ";
    

    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.

    评论

报告相同问题?

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀