Jump to content


PHP mail is not working using Apache

  • Please log in to reply
2 replies to this topic

#1 atulkul

  • Members
  • PipPip
  • Member
  • 23 posts

Posted 12 October 2006 - 03:10 PM

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.

#2 wildteen88

  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 12 October 2006 - 04:10 PM

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:
; For Win32 only.
SMTP = localhost
smtp_port = 25
Change localhost to your ISPs SMTP mail servers addresss, eg: smtp.hostname.com
the smtp_port is fine.

#3 atulkul

  • Members
  • PipPip
  • Member
  • 23 posts

Posted 13 October 2006 - 05:28 AM

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

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users