gmail = $gmail; $this->token = $token; } public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $this->gmail->using($this->token); $this->gmail->to($message->getTo()); $this->gmail->from($message->getFrom()); $this->gmail->subject($message->getSubject()); $this->gmail->message($message->getBody()); //$this->gmail->message($message->toString()); $this->gmail->cc($message->getCc()); $this->gmail->bcc($message->getBcc()); $this->gmail->send(); $this->sendPerformed($message); return $this->numberOfRecipients($message); } }