Mibew Messenger 1.6.4 with phpmailer via SMTP (I have v5.1)
1 Download phpmailer (
http://sourceforge.net/projects/phpmailer/files/phpmailer%20for%20php5_6/PHPMailer%20v5.1) and extract
class.phpmailer.php and class.smtp.php to a location in the libs/mailer directory.
2. Open libs/notify.php and add a line to load the phpmailer
require_once('/mailer/class.phpmailer.php');
3. then adjust the webim_mail function to have look like this...
function webim_mail($toaddr, $reply_to, $subject, $body, $link)
{
global $webim_encoding, $webim_mailbox, $mail_encoding,
$current_locale;
$headers = "From: $webim_mailbox\r\n"
. "Reply-To: " . myiconv($webim_encoding,
$mail_encoding, $reply_to) . "\r\n"
. "Content-Type: text/plain;
charset=$mail_encoding\r\n"
. 'X-Mailer: PHP/' . phpversion();
$real_subject = "=?" . $mail_encoding . "?B?" .
base64_encode(myiconv($webim_encoding, $mail_encoding, $subject)) . "?=";
$body = preg_replace("/\n/", "\r\n", $body); //I couldn't get the line breaks to work
$is_smtp = true;
if ($is_smtp) {
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = false; // enable SMTP
authentication
//$mail->SMTPSecure = "ssl"; // sets the
prefix to the server
$mail->Host = "example.comp.com:25"; // sets up
fqdn of your SMTP server : port
//$mail->Port = 25; // set the SMTP
port
//$mail->Username = "
webmaster@mydomain.com"; // username
if auth = true
//$mail->Password = "secretpass"; // password
if auth = true
$mail->From = $webim_mailbox;
$mail->FromName = "Chat Server"; // you can adjust these to suit
$mail->Subject = $subject;
$mail->AltBody = $body; //Text Body
$mail->WordWrap = 50; // set word wrap
$mail->MsgHTML($body);
$mail->AddReplyTo("
webmaster@comp.com","
webmaster@comp.com");
$mail->AddAddress($toaddr, $toaddr);
$mail->IsHTML(false); // send as HTML
$mail->Send();
} else {
@mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding,
$mail_encoding, $body), 70), $headers);
}
}