zrobilem sobie dodatkowa klase Mail za pomoca ktorej odwoluje sie do klasy phpmailer'a
<?php /*========================================================================*\ * Fusion Bulletin Board * * @package : Fusion Bulletin Board * @author : xxx * @license : <a href="http://www.gnu.org/licenses/gpl-3.0.html" target="_blank">http://www.gnu.org/licenses/gpl-3.0.html</a> * *========================================================================*| * * $Date$ * $Revision$ * $Author$ * *========================================================================*/ class Mail { private $object = NULL; public function create() { require_once( CLASSES . 'phpmailer.Class.php' ); //Includujemy klase phpmailer $this->object = new PHPMailer(); } public function send_mail( $receiver, $subject, $message ) { $mail = $this->object; $mail->IsSMTP(); $mail->Host = $smtp['host']; // SMTP server $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = $smtp['prefix']; // sets the prefix to the servier $mail->Host = $smtp['host']; // sets GMAIL as the SMTP server $mail->Port = $smtp['port']; // set the SMTP port for the GMAIL server $mail->Username = $smtp['username']; $mail->Password = $smtp['password']; $mail->SetFrom( $smtp['username'] , $board['board_name']); $mail->Subject = $subject . ' - ' . $board['board_name']; $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; $mail->MsgHTML( $message ); $mail->AddAddress( $receiver, '' ); if( !$mail->Send() ) { return false; } else { return true; } } } ?>
czy mozliwe ze to phpmailer tak zwalnia? albo ja zle korzystam z niego