Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezmailtransport.php
Go to the documentation of this file.
1 <?php
17 class eZMailTransport
18 {
23 function sendMail( eZMail $mail )
24 {
25 return false;
26 }
27
32 static function send( eZMail $mail )
33 {
34 $ini = eZINI::instance();
35
36 $transportType = trim( $ini->variable( 'MailSettings', 'Transport' ) );
37
38 $optionArray = array( 'iniFile' => 'site.ini',
39 'iniSection' => 'MailSettings',
40 'iniVariable' => 'TransportAlias',
41 'handlerIndex' => strtolower( $transportType ) );
42 $options = new ezpExtensionOptions( $optionArray );
43 $transportClass = eZExtension::getHandlerClass( $options );
44
45 if ( !is_object( $transportClass ) )
46 {
47 eZDebug::writeError( "No class available for mail transport type '$transportType', cannot send mail", __METHOD__ );
48 }
49 return $transportClass->sendMail( $mail );
50 }
51 }
52
53 ?>
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZExtension\getHandlerClass
static getHandlerClass(ezpExtensionOptions $options)
Definition: ezextension.php:531
eZMailTransport
Interface for mail transport handling.
Definition: ezmailtransport.php:18
eZMailTransport\send
static send(eZMail $mail)
Definition: ezmailtransport.php:32
eZMailTransport\sendMail
sendMail(eZMail $mail)
Definition: ezmailtransport.php:23
eZMail
Mail handler.
Definition: ezmail.php:60
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.