gmail api adding label id and thread id while sending as reply (send mail with same thread id while reply)
问题 I'm trying to send mail using gmail api using laravel. my sent msg is $text = 'From: '.$from.' To: '.$to.' Subject:'.$subject.' '.$body.''; $encoded_message = rtrim(strtr(base64_encode($text), '+/', '-_'), '='); $message->setRaw($encoded_message); $message = $service->users_messages->send($userId, $message); I tried to edit label id and thread id as follows, $text = 'labelIds: ':'.SENT.' 'From: '.$from.' To: '.$to.' Subject:'.$subject.' '.$body.''; which gives syntax error. How to add labelid