smtp error : could not authenticate

the mail() function

Moderators: egami, macek, gesf

Post Reply
User avatar
New php-forum User
New php-forum User
Posts: 9
Joined: Sun Mar 04, 2012 11:19 pm

Sun Nov 04, 2012 5:59 pm

hai there..

I got this error using PHPMailer.

currently if i put under my localhost it go smoothly never came out any error, but once i put under my hosting it show an error smtp error: could not authenticate, please advise me what should i do.. :( :( :( :(

and Here is the code.

$mail = new PHPMailer();

$header = "<font class='type3'>Dear ".$data->MEM_NAME.",\n<br><p>
<font class='type3'>Below is your password. Please login using :-<br><br>\n\n
<font class='type3'>Username : <b>".$data->MEM_UN."</b>\n<br>
<font class='type3'>Password : <b>".$newpwd."</b>\n<br><p>";
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "";
$mail->Port = 465;
$mail->Username = "";
$mail->Password = "xxxxxxx";

$mail->SetFrom('', 'Team');
$mail->Subject = "Username & Password Request";
$mail->AltBody = "<br>This email has been automatically generated from an
unmonitored mailbox. Please do not use the reply function.";

$address = $data->MEM_EMAIL; // address send to :
echo "<script>alert('Email not exist for this ID : ".$mem_id."');</script>";

:help: :help: :help: :help: :help:

Post Reply