ezMailtransport ezMail

geposted am 07.09.2008, in eZ Publish


include_once( "lib/ezutils/classes/ezmail.php" ); 
include_once( "lib/ezutils/classes/ezmailtransport.php" );   

if (!eZMail::validate($sender) || !eZMail::validate($recipient)) 
{   cry();  } 
else
 {    
$mail = new eZMail();   
$mail->setSender( $sender );
$mail->setReceiver( $recipient );   
$mail->setSubject( $subject );   
$mail->setBody( $body );   
$mail->addBcc( $bcc );   
$mail->addExtraHeader("X-SpamLevel","1000");                                     
if ( !eZMailTransport::send( $mail ) )
{      cry();     }   }