Jump to content

Archived

This topic is now archived and is closed to further replies.

atulkul

PHP mail is not working using Apache

Recommended Posts

Hello all,

PHP mail is giving error like the following:
Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
plz let me know what is the problem and solution for it.

Share this post


Link to post
Share on other sites
You need to either setup an SMTP server on the computer that has PHP installed on. Or point PHP to an existing (public) SMTP mail server, such as your ISPs email server (if they do not require authentication for emails to be sent).

You need to open up the php.ini and find the the following lines:
[code]; For Win32 only.
SMTP = localhost
smtp_port = 25[/code]
Change localhost to your ISPs SMTP mail servers addresss, eg: smtp.hostname.com
the smtp_port is fine.

Share this post


Link to post
Share on other sites
Ok, i will tell you my server configuration its Apache + PHP + Mysql and apache installed on port 80, site is running on apache , while IIS is installed with smtp server , but i want to know how to active SMTP server using Apache, plz resolve this issue

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.