0

我有一个问题,我想将数据保存到谷歌驱动器上的在线共享文本文档中。但它不起作用。没有错误,只是没有将任何内容保存到文档中,而且我已经向公众授予了文档的完全访问权限。

////// email code
        require_once "Mail.php";    
        $from = "Babylovenappies <****@gmail.com>";
        $to = "nassim@*****.com";
        $recipients = $to;
        $subject = $subject;
        $body = $message;
        $host = "ssl://smtp.googlemail.com";
        $port = "465";
        $username = "****@gmail.com";
        $password = "****";
        $headers = array ('From' => $from,
        'To' => $to,
        'Bcc' => "admin@***.com.au",
        'Subject' => $subject,
        'MIME-Version' => "1.0",
        'Content-type' => "text/html; charset=iso-8859-1");
        $smtp = Mail::factory('smtp',
        array ('host' => $host,
        'port' => $port,
        'auth' => true,
        'username' => $username,
        'password' => $password));
        $mail = $smtp->send($recipients, $headers, $body);


        $fh = fopen('https://docs.google.com/document/d/1dS_MhqGnLkb22mwU6OKfxoiFcX0izRTvjjf8eJ7igiE/edit?usp=sharing', "a");
        fwrite($fh, $to);
        fclose($fh);

提前致谢

4

1 回答 1

0

你绝对应该使用 API

看看这个: 文件:更新

于 2013-10-18T11:32:52.457 回答