Category : gmail-api

I’m new to this API and currently trying to send email by Gmail. I have Laravel installed and required by composer google/apiclient:"^2.7". That’s how I call create message and send functions $message = $this->googleApi->createMessage($user->name, $user->email, ‘An email’, $text); $client = new Google_Client(); $service = new Google_Service_Gmail($client); $userId = ‘my-google-id.apps.googleusercontent.com’ $sendMessage = $this->googleApi->sendMessage($service, $userid, $message); class ..

Read more

I am usign phpmailer to send a simple email via oauth2. However with below settings I am getting error Message could not be sent. Mailer Error: Could not instantiate mail function The settings are $mail = new PHPMailer(true); $mail->oauthUserEmail = ‘[email protected]’; $mail->oauthClientId = ‘abc-def’; $mail->oauthClientSecret = ‘-defas’; $mail->oauthRefreshToken = ‘1//asdfadsf’; //$mail->isSMTP(); $mail->SMTPAuth = false; $mail->AuthType ..

Read more

I’m using Gmail API https://developers.google.com/gmail/api/v1/reference/ . But I can’t find single message info like- FROM, TO, CC, BCC, REPLY-TO with name and address. Need output as- $msg[‘fromAddress’] = ‘[email protected]’; $msg[‘fromName’] = ‘From Name’; $msg[‘to’] = array(‘John Lok’ => ‘[email protected]’, ‘Smither Fan’=>’[email protected]’); $msg[‘cc’] = array(‘krish Hosa’ => ‘[email protected]’, ‘Singam Hat’=>’singh[email protected]’); $msg[‘bcc’] = array(‘Loban’ => ‘[email protected]’, ‘Krain ..

Read more