Hi People,
I'm using a php to send an mail using a server via ssl. My program:
<?php
require("class/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPDebug = 1;
// 0 = no output, 1 = errors and messages, 2 = messages only.
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "webmail.***.srv.br";
$mail->Port = 587;
$mail->Username = "user@***.srv.br";
$mail->Password = "passw";
$mail->CharSet = 'windows-1250';
$mail->From = '"user@***.srv.br';
$mail->AddBCC ( '
[email protected]', 'xx');
$mail->Subject = $subject;
$mail->ContentType = 'text/plain';
$mail->IsHTML(false);
$mail->Body = $body_of_your_email;
// you may also use $mail->Body = file_get_contents('your_mail_template.html');
$mail->AddAddress ('
[email protected]', 'Recipients Name');
// you may also use this format $mail->AddAddress ($recipient);
if(!$mail->Send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
} else
{
echo "Successfully sent!";
}
?>
but i receive this error:
SMTP -> ERROR: AUTH not accepted from server: 503 5.5.1 Error: authentication not enabled SMTP -> ERROR: RCPT not accepted from server: 554 5.7.1 : Client host rejected: Access denied SMTP -> ERROR: RCPT not accepted from server: 554 5.7.1 : Client host rejected: Access denied Mailer Error: Language string failed to load:
[email protected], [192.168.9.153]>[192.168.9.153]>
[email protected]
I tried using command line: openssl s_client -starttls smtp -crlf -connect webmail.***.srv.br:587 and it works!!! Why via php i got the error ?
In phpinfo:
OpenSSL support enabled OpenSSL Version OpenSSL 0.9.8h 28 May 2008
Anyone can help me ?
Thanks.