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 | @timcappalli | timcappalli.me |

NOTE: Answers and views expressed by me on this forum are my own and not necessarily the position of Aruba or Hewlett Packard Enterprise.
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 | @timcappalli | timcappalli.me |

NOTE: Answers and views expressed by me on this forum are my own and not necessarily the position of Aruba or Hewlett Packard Enterprise.
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?


*Answers and views expressed by me on this forum are my own and not necessarily the position of Aruba Networks or Hewlett Packard Enterprise.*
ArubaOS 8.4 User Guide
InstantOS 8.3 User Guide
Airheads Knowledgebase
Airheads Learning Videos
Aruba Central Documentation
Sign up for Security Alerts
Aruba Technical Webinars
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: