smtp_port problem

the mail() function

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 3
Joined: Fri Mar 07, 2003 1:51 am

smtp_port problem

Postby aijazasoomro » Fri Mar 07, 2003 2:52 am

Hi dear i am trying to use mail() function so i get this error so please tell me the solution

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 c:\apache\htdocs\ch25\sendmail.php on line 3
Message Sent! Back to menu

I will be thank ful for this act of kindness

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Mon Mar 10, 2003 2:16 am

man this is offtopick
see your php.ini

User avatar
New php-forum User
New php-forum User
Posts: 7
Joined: Mon Apr 07, 2003 8:00 pm
Location: Vietnam

Postby quantm » Sat Apr 19, 2003 2:42 am

If you are under Linux, you should assure that the Sendmail Daemon are running by type the following command:
nmap -sT localhost
You should see
25/tcp open smtp

If not, make Sendmail Daemon run by typping:
/etc/rc.d/init.d/sendmail start
/etc/rc.d/init.d/sendmail restart
(type rpm -qc snedmail for other information)

If you are under Window, you should have an smtp running on another machine (linux) and do some other configs

Hope that help!

User avatar
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Re: smtp_port problem

Postby WiZARD » Thu Apr 24, 2003 4:26 am

if you wanted what it's work to you need install SMTP server!

Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest