Tuba Posted July 10, 2011 Share Posted July 10, 2011 Hi I have a situation that if a customer has forgotton their password and request it providing their email they get this warning: "Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\Domains\teagownsandtextiles.co.uk\wwwroot\store\upload\classes\htmlMimeMail.php on line 706: And a message as well saying for example Forgotten Password A new password has been sent to [email protected]. I can't find anyhwere php.ini and I tried to modify E:\Domains\teagownsandtextiles.co.uk\wwwroot\store\upload\classes\htmlMimeMail.php on line 706 with the addition of ini_set() and placed it here: $result = mail($to, $subject, ini_set(), $this->output, implode(CRLF, $headers)); but this did not work. Can anyone advise me what to do I am not a techo so please if possible make is simple. On the advise of my server company I made the mail part of general setting as per the attached. They suggested that if the feault smtp port of 25 did not work to maske it 49. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 10, 2011 Share Posted July 10, 2011 Failing to connect to the mail server at localhost tells me that your hosting provider does not have a mail server for your scripts to use, has turned it off, or has a problem with it. Your hosting provider should have given much better instruction on what is available to your scripts and what settings to use. If your hosting plan states you have the ability to send email, then what you have entered in the admin screen is almost complete: change to SMTP method, and choose Use Authentication = yes. Also, go back to port 25. Remove the edit you made to the file. If your hosting provider does not have a mail server for you as part of your hosting package, then you must find another. A good candidate is the company where you have your own email at. You will need to contact them for the settings if you don't have them already. The file php.ini is generally not available for hosted customers to access or modify, though some providers allow you to create a php.ini file that will add to or override the settings in the main file. It is somewhat strange that CC3 said the mail got sent, but not totally erroneous in what is to be expected. I would have to double-check the code. Quote Link to comment Share on other sites More sharing options...
Tuba Posted July 10, 2011 Author Share Posted July 10, 2011 Failing to connect to the mail server at localhost tells me that your hosting provider does not have a mail server for your scripts to use, has turned it off, or has a problem with it. Your hosting provider should have given much better instruction on what is available to your scripts and what settings to use. If your hosting plan states you have the ability to send email, then what you have entered in the admin screen is almost complete: change to SMTP method, and choose Use Authentication = yes. Also, go back to port 25. Remove the edit you made to the file. If your hosting provider does not have a mail server for you as part of your hosting package, then you must find another. A good candidate is the company where you have your own email at. You will need to contact them for the settings if you don't have them already. The file php.ini is generally not available for hosted customers to access or modify, though some providers allow you to create a php.ini file that will add to or override the settings in the main file. It is somewhat strange that CC3 said the mail got sent, but not totally erroneous in what is to be expected. I would have to double-check the code. Hi Bsmither thanks for your reply, I changes the general setting control to be smtp and smtp port back to 25 and everything is now working. Many thanks for your help. :rolleyes: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.