Switch to GmailTransport for sending mails.

This commit is contained in:
Markus Birth 2016-08-04 18:14:15 +02:00
parent 90d3afcf2f
commit 99870d94c4

View File

@ -7,7 +7,7 @@ use \Frs\SessionManager;
use \Frs\Output\HtmlOutput;
use \Frs\Output\MailOutput;
use \Frs\Output\Transport\StdoutTransport;
use \Frs\Output\Transport\MailTransport;
use \Frs\Output\Transport\GmailTransport;
$stdout = new StdoutTransport();
$ho = new HtmlOutput($stdout, dirname(__FILE__) . '/templates');
@ -71,7 +71,7 @@ if (!$tpl_done && $sm->hasSessionToken()) {
switch ($action) {
case 'send':
echo 'This would send the mail...';
$mt = new MailTransport();
$mt = new GmailTransport($sm);
$mo = new MailOutput($mt, dirname(__FILE__) . '/templates');
$form_type = $_REQUEST['form_type'];
$mo->setTemplate('mail_' . $form_type);