FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


how to config php ini for mail locally





les771
I am currently trying to get a php mail function to work locally. I keep getting error "Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()" I am using oscommerce and have ArgoSoft mail server installed locally. I am not sure how to adjust my smtp_port settings in php.ini. So far I have added this to php.ini but it has not worked.

[mail function]
; For Win32 only.
SMTP = localhost
sendmail_from = webmaster@localhost
smtp_port = 25

Also, Im not sure how to use ini_set in my php code. I am using oscommerce so all the code is already there.

Thanks.
MrBlueSky
Some things you can try:

- use 127.0.0.1 instead of localhost
- see if the SMTP server indead is running (run netstat -an from a dosbox and see if port 25 is listening)
- see if you can connect with your SMTP server (using telnet or outlook or something)

Maybe you need to configure a username and password.
les771
I did run telnet localhost 25 and the Argosoft mailserver is working. I also ran a form script to see if emails were being sent that way and the mail server did work and did send the email to my outlook email client.

Do you mean to config a username and password in the php.ini? If so, how would I do that?

username = password?

thanks.
Related topics
my config.php............
php.ini
PHP.ini
phpBB - Installation Tutorial
php.ini[RESOLVED]
Where is the php.ini file?
A Question about the PHP.INI file.
FATAL ERROR: register_globals is disabled in php.ini
php.ini
vBulletin Config.php script
a bit of help with my php.ini, please?
All Joomla Related Topics
php.ini
error in PHP.ini
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.