Controllerless Networks

Reply
New Contributor

authentication failure - Invalid response code received from server

this is the error i get when i run my php script for sending email authentication failure [SMTP: Invalid response code received from server (code: 535, response: 5.7.0 ...authentication rejected)]

this are the smtp configurations i have done

 

 

 $from="postmaster";$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$host="ssl://smtp.aruba.it";$port="465";$username="info@****.com";$password="*****";
$body = $mime -> get();$headers = $mime -> headers($headers);$smtp= Mail::factory('smtp',array('host'=>$host, 'port'=>$port,'auth' => true,
    'username' => $username,
    'password' => $password));
$query="SELECT * from payment where iduser='$iduser'";$result=mysql_query($query);
while ($row=mysql_fetch_array($result)) {
    if ($row['amount'] > 0)$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {  echo("<p>" . $mail->getMessage() . "</p>");
 }

 

Guru Elite

Re: authentication failure - Invalid response code received from server

Where are you running the script?

Tim Cappalli | Aruba Security TME
@timcappalli | timcappalli.me | ACMX #367 / ACCX #480
New Contributor

Re: authentication failure - Invalid response code received from server

what do you mean by where? i am calling the php file in javascript

 

Guru Elite

Re: authentication failure - Invalid response code received from server

Yes, but from where? Please provide some context on your setup.

Tim Cappalli | Aruba Security TME
@timcappalli | timcappalli.me | ACMX #367 / ACCX #480
New Contributor

Re: authentication failure - Invalid response code received from server

This script sends automatic emails(user credentials) when it is called, and it is called in javascript at the moment when a user click the button registrate. At that moment is shown this error, i don't know if i am clear

New Contributor

Re: authentication failure - Invalid response code received from server

the email i am using to send messages is registered in aruba that's why i have used as host: smtp.aruba.it

Guru Elite

Re: authentication failure - Invalid response code received from server

- What host are you sending the email from?

- Is this script running on a client captive portal?  If not, what server is it running on?



Colin Joseph
Aruba Customer Engineering

Looking for an Answer? Search the Community Knowledge Base Here: Community Knowledge Base

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: