This repository has been archived on 2025-03-31. You can view files and clone it, but cannot push or open issues or pull requests.
php-frs/lib/Frs/Output/Transport/GmailTransport.php

45 lines
913 B
PHP

<?php
namespace Frs\Output\Transport;
class GmailTransport implements TransportInterface
{
private $gms;
private $recipients;
private $subject;
private $headers;
private $content;
public function _construct(\Frs\SessionManager $sm)
{
$this->gms = new Google_Service_Gmail($sm->getGoogleClient());
}
public function setContent($content)
{
$this->content = $content;
}
public function setRecipients($recipients)
{
$this->recipients = $recipients;
}
public function setSubject($subject)
{
$this->subject = $subject;
}
public function setHeaders($headers)
{
$this->headers = $headers;
}
public function transmit()
{
$optParams = array();
$postBody = new Google_Service_Gmail_Message();
$this->gms->users_messages->send('me', $postBody, $optParams);
}
}