Getting error while trying to retrieve password in application

Created a new application and installed security features. When i click on retrive password on login module i got a screen asking for loginname and after entering the login name and clicking OK i got this below mentioned error.

Fatal error: Uncaught exception ‘Swift_IoException’ with message ‘Connection to vps11531.inmotionhosting.com:465 Timed Out’ in /Applications/NetMake/v7/wwwroot/scriptcase/prod/third/swift/classes/Swift/Transport/StreamBuffer.php:174 Stack trace: #0 /Applications/NetMake/v7/wwwroot/scriptcase/prod/third/swift/classes/Swift/Transport/AbstractSmtpTransport.php(438): Swift_Transport_StreamBuffer->readLine(0) #1 /Applications/NetMake/v7/wwwroot/scriptcase/prod/third/swift/classes/Swift/Transport/AbstractSmtpTransport.php(315): Swift_Transport_AbstractSmtpTransport->_getFullResponse(0) #2 /Applications/NetMake/v7/wwwroot/scriptcase/prod/third/swift/classes/Swift/Transport/AbstractSmtpTransport.php(123): Swift_Transport_AbstractSmtpTransport->_readGreeting() #3 /Applications/NetMake/v7/wwwroot/scriptcase/prod/third/swift/classes/Swift/Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start() #4 /Applications/NetMake/v7/wwwroot/scriptcase/app/mailtest/app_retrieve_pswd/app_retrieve_pswd_apl.php(2011): Swift_Mailer->send(Obje in /Applications/NetMake/v7/wwwroot/scriptcase/prod/third/swift/classes/Swift/Transport/StreamBuffer.php on line 174

I have also checked sec_retrieve_password and the settings for SMTP is working fine. I have used the same SMTP settings in other parts of my application liek when i add employee the employee must receive an email. This part is working fine. Not getting password retrieval email alone. But got error while trying to use the feature.

Please help

Thanks in advance
Kumar

Check your deployed source code file AbstractSmtpTransport.php and check the line 174. Likely there is some code that wants to connect to the outside but it is not allowed (Time Out error). So it tries to connect but cant.
I guess you are not even reaching the smtp server OR the smtp server does not allow access from certain ip ranges (this is happens a lot).

If there is a problem in reaching the smtp server then the same should persist for the entire application. But the send email is working fine on other parts of application. Im getting error only on retrieve password feature.When i checked with AbstractSmtpTransport.php i found the below mentioned method where the timeout occurs.

if (!$reversePath = $this->_getReversePath($message))
{
throw new Swift_TransportException(
‘Cannot send message without a sender address’
);

Here i have mentioned the senders address too. But still the problem sustains. Can anyone help me to fix this…

Thanks
Kumar

Hi,

Sorry to revive an old post but seeing the number of views and not having a solution I want to share what worked for me.

Indeed, I created my Login from the security module. The “recover password” app showed me an error when trying to send the mail (Not the same, but something similar, it didn’t work anyway).

To fix it, I changed the default “sc_mail_send_api” macro to the “sc_mail_send” macro, like this:

 /**
     * Send a simple email
     */

    $rs = sc_mail_send('smtp.example.com.co',				// Server SMTP
    			 'webmaster@example.com.co',				// Email user
    			 'MyP4sSw#',								// Password email
    			 'webmaster@example.com.co',				// From
    			 [usr_email],								// To
    			 {lang_subject_mail},						// Subject
    			 $param_message,							// Body message
    			 'H',										// Type HTML
    			 'hidde@example.com.co',					// Copies
    			 'BCC',										// Copies Type
    			 '587',										// SMTP Port
    			 'N',										// Security
    			 '', 										// Attachment
    			 '', 										// SSL +Config
    			 'no-reply@example.com.co'); 				// Reply to


    if($rs){
    	sc_alert({lang_mail_sended_ok} );
    }
    else
    {
    	sc_error_message({sc_mail_erro});
    }

Important, do not change the variables (Unless you know clearly what you are doing):

 [usr_email],								// To
{lang_subject_mail},						// Subject
$param_message,							// Body message

example