Esempio n. 1
0
 private function continueMail()
 {
     $session = \Sifo\Session::getInstance();
     if (!($this->mail_data = $session->get('mail_data'))) {
         throw new \Sifo\Exception_500('No exists mail data to send the mail');
     }
     $session->delete('mail_data');
     $mail = new \Sifo\Mail();
     return $mail->send($this->mail_data['to'], $this->mail_data['subject'], $this->mail_data['body']);
 }
Esempio n. 2
0
 private function _sendMail()
 {
     if (isset($this->_recipient)) {
         if (self::MAX_LINES_WITHOUT_SEND_MAIL < count(explode(PHP_EOL, $this->_stdout)) - 1) {
             $this->showMessage("Now I would try send an email with subject: '" . $this->getSubject() . "' to '" . $this->_recipient . "'", self::TEST);
             if (!$this->test) {
                 $mail = new \Sifo\Mail();
                 $mail->send($this->_recipient, $this->getSubject(), $this->_reformatToEmail($this->_stdout));
             }
         } else {
             $this->showMessage("Unsent email because the script output was empty.");
         }
     }
 }