Email sending improvements ========================== DebugSending ------------ When this is enabled (in [MailSettings] in site.ini) then no mails will be sent to the intended recipients. Instead they will be sent to the address in the DebugReceiverEmail setting. This is useful for example when working on a test server that contains a copy of the production database. You can test mail sending without worrying about test emails being sent to your end users. This feature applies to emails sent through the eZMail API. Mails sent using PHPs mail() function, or other methods, will not be affected. New SMTP class -------------- The class smtp is replaced with ezcMailSmtpTransport from eZ Components. The class eZMail will be deprecated in favour of ezcMail from eZ Components. To avoid breaking BC, the class eZMail will be rewritten to store its data in an ezcMail object. The data will be stored also in existing structures inside eZMail to allow sendmail and file transports to work as before. Existing code relying on eZMail will not be affected, but it is expected that ezcMail will replace eZMail completely in a future release of eZ Publish. The eZMail class was used like this (with old smtp class which will be removed):: setSender( $fromEmail, $yourName ); $mail->setReceiver( $receiversEmail, $receiversName ); $mail->setSubject( $subject ); $smtp = new smtp( $parameters ); $smtpConnected = $smtp->connect(); if ( $smtpConnected ) { $result = $smtp->send( $sendData ); } ?> Since the smtp class will be removed, ezcMailSmtpTransport from eZ Components can be used temporarily instead (the class eZSMTPTransport is using ezcMailSmtpTransport instead of smtp as well):: send( $mail->Mail ); ?> Instead of the code above, ezcMail will be used together with the SMTP transport from eZ Components (MTA transport will work as well): from = new ezcMailAddress( $fromEmail, $yourName ); $mail->addTo( new ezcMailAddress( $receiversEmail, $receiversName ) ); $mail->subject = $subject; $smtp = new ezcMailSmtpTransport( $host, $username, $password, $port ); $smtp->send( $mail ); ?>