コード例 #1
0
ファイル: Output.php プロジェクト: questrom/formulaic
 function run($data, $page)
 {
     # Create the email
     $view = new ConfirmationEmail($this, $data['_timestamp']);
     $stringifier = new Stringifier();
     $html = '<!DOCTYPE html>' . $stringifier->stringify($view);
     # ... and send it!
     $mail = new Message();
     $mail->setFrom($this->from)->addTo($data[$this->emailField])->setSubject($this->subject)->setHTMLBody($html);
     $mailer = new SmtpMailer(Config::get()['smtp']);
     $mailer->send($mail);
     return $data;
 }