PDA

View Full Version : change my settings SMTP 25 to port 26 in myPHP scripts


chris_arizala
09-07-2006, 01:23 AM
Can anyboady help me to change my settings from 25 to 26 . I have a PHP scripts that uses port 25 suddenly my hosting change their setting to 26 i dont know how to change my scripts to 26... can anyone give a PHP scripts how to change my port 25 to 26.. Because they told me to define my port settings to port 26 but i dont know how to do it... is there any scripts....

because these error output:
we could not send your message at this time, please try again laterPHP Warning: mail(): Failed to connect to mailserver at "localhost" port 26, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\Ensim\Sitedata\dcdesign\Inetpub\wwwroot\web2mail\mail_functions.php on line 24

Nook Schreier
09-07-2006, 03:24 PM
I would leave your hosting provider for doing something so stupid. Assuming that is not a possibility, though, it depends which OS the provider is running. The port is not set in your code if you use the PHP-internal mail() function.

For Windows, you must edit the file php.ini, which contains php configuration options. There is an option in there called "smtp_port." I would have thought that your provider would have to edit that, though.

Unix systems usually use sendmail (or a more recent comparable program) to send EMail, and you shouldn't need to edit anything with regards to that; that should be the job of your provider; you should not be able to edit that file, let alone see it. If you do have to do your own sendmail configuration... good luck.