diff --git a/lib/Frs/Output/Transport/GmailTransport.php b/lib/Frs/Output/Transport/GmailTransport.php new file mode 100644 index 0000000..7dd3883 --- /dev/null +++ b/lib/Frs/Output/Transport/GmailTransport.php @@ -0,0 +1,44 @@ +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); + } +} diff --git a/lib/Frs/SessionManager.php b/lib/Frs/SessionManager.php index bbba7c7..e71e961 100644 --- a/lib/Frs/SessionManager.php +++ b/lib/Frs/SessionManager.php @@ -92,4 +92,9 @@ class SessionManager ); return $result; } + + public function getGoogleClient() + { + return $this->client; + } }