PHP Gmail API获取发件人,收件人,抄送,密件抄送,回复至,正文,附件的邮件信息

时间:2020-11-05 20:51:15

标签: php email gmail-api

我正在使用Gmail API https://developers.google.com/gmail/api/v1/reference/

但是我找不到带有名称和地址的单个消息信息,例如-FROM,TO,CC,BCC,REPLY-TO。 需要输出为-

$msg['fromAddress'] = 'fromemail@gmail.com';
$msg['fromName'] = 'From Name';
$msg['to'] = array('John Lok' => 'johnlok@gmail.com', 'Smither Fan'=>'smither@gmail.com');
$msg['cc'] = array('krish Hosa' => 'krish23@gmail.com', 'Singam Hat'=>'singhamso@gmail.com');
$msg['bcc'] = array('Loban' => 'lobandash@gmail.com', 'Krain Root'=>'krainroot@gmail.com');
$msg['body'] = 'sample Message Text';
$msg['attachments'] = array('Flower.jpg' => 'https://filelink.com/files/Flower-d9edkifsk3edmfsdf94rffjofs.jpg', 'Bill List.pdf'=>'https://filelink.com/files/Bill-List-34324234mfskfsofsc.pdf');
$msg['reply-to'] = array('From Name' => 'fromemail@gmail.com');

0 个答案:

没有答案