Switch to GmailTransport for sending mails.
This commit is contained in:
parent
90d3afcf2f
commit
99870d94c4
@ -7,7 +7,7 @@ use \Frs\SessionManager;
|
|||||||
use \Frs\Output\HtmlOutput;
|
use \Frs\Output\HtmlOutput;
|
||||||
use \Frs\Output\MailOutput;
|
use \Frs\Output\MailOutput;
|
||||||
use \Frs\Output\Transport\StdoutTransport;
|
use \Frs\Output\Transport\StdoutTransport;
|
||||||
use \Frs\Output\Transport\MailTransport;
|
use \Frs\Output\Transport\GmailTransport;
|
||||||
|
|
||||||
$stdout = new StdoutTransport();
|
$stdout = new StdoutTransport();
|
||||||
$ho = new HtmlOutput($stdout, dirname(__FILE__) . '/templates');
|
$ho = new HtmlOutput($stdout, dirname(__FILE__) . '/templates');
|
||||||
@ -71,7 +71,7 @@ if (!$tpl_done && $sm->hasSessionToken()) {
|
|||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'send':
|
case 'send':
|
||||||
echo 'This would send the mail...';
|
echo 'This would send the mail...';
|
||||||
$mt = new MailTransport();
|
$mt = new GmailTransport($sm);
|
||||||
$mo = new MailOutput($mt, dirname(__FILE__) . '/templates');
|
$mo = new MailOutput($mt, dirname(__FILE__) . '/templates');
|
||||||
$form_type = $_REQUEST['form_type'];
|
$form_type = $_REQUEST['form_type'];
|
||||||
$mo->setTemplate('mail_' . $form_type);
|
$mo->setTemplate('mail_' . $form_type);
|
||||||
|
Reference in New Issue
Block a user