phpmailer кто устанавливал настраивал

Главные вкладки

Аватар пользователя Гость Гость (не проверено) 21 июля 2006 в 12:51

Как запустить phpmailer?
Скачал и положил phpmailer (class.phpmailer.php , class.smtp.php) в includes
так же создал phpmailer.inc со следующим текстом:

<?php
include_once 'includes/phpmailer/class.phpmailer.php';

function user_mail_wrapper($mail, $subject, $message, $header) {
$mailer = new PHPMailer(); // instantiate a new mailer
$mailer->IsSMTP(); // send via SMTP
$mailer->Host = "mail.xxx.ru"; // SMTP server
$mailer->SMTPAuth = FALSE; // turn on SMTP authentication
// $mailer->Username = 'username'; // SMTP username
// $mailer->Password = 'password'; // SMTP password
$mailer->AddAddress($mail); // can only send to one recipient
$mailer->From = 'member.admin@cornerstar.com'; // from address (default root@localhost)
$mailer->FromName = 'Membership Administrator'; // from name (default 'root user')
$mailer->Subject = $subject;
$mailer->AddCustomHeader( explode("\n", $header)); // add custom header info
// if body is not formatted properly change str_replace - see user.module user_mail() for details
$mailer->Body = str_replace("\n", "\r\n", $message); // Body of message

if(!$mailer->Send()){
watchdog('error', 'mail send error: ' . $mailer->ErrorInfo);
return false;
}
return true;

}
?>

Прописал phpmailer в sites\default\settings.php
следующей строчкой:
$conf["smtp_library"] = "includes/phpmailer.inc";

как заставить работать эту штуку!!!