/** * Factory method for mail. * * @param bool $deferred Whether mail sending can be deferred * * @return vB_Mail */ public static function fetchLibrary($deferred = false) { if (self::$enableTestCapture and class_exists('vB_Mail_Test')) { return new vB_Mail_Test($deferred); } if ($deferred) { return vB_Mail_Queue::fetchInstance(); } if (vB::getDatastore()->getOption('use_smtp')) { return new vB_Mail_Smtp(); } return new vB_Mail(); }
<?php if (!defined('VB_ENTRY')) { die('Access denied.'); } /*========================================================================*\ || ###################################################################### || || # vBulletin 5.1.9 - Licence Number LD18132D6F || # ------------------------------------------------------------------ # || || # Copyright 2000-2015 vBulletin Solutions Inc. All Rights Reserved. # || || # This file may not be redistributed in whole or significant part. # || || # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ###################################################################### || \*========================================================================*/ // ######################## SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); if (vB::getDatastore()->getOption('mailqueue')) { $mailqueue = vB_Mail_Queue::fetchInstance(); $mailqueue->execQueue(); log_cron_action('execMailQueue', array(), false); } /*=========================================================================*\ || ####################################################################### || # Downloaded: 15:45, Tue Sep 8th 2015 || # CVS: $RCSfile$ - $Revision: 83435 $ || ####################################################################### \*=========================================================================*/