471,870 Members | 1,338 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,870 software developers and data experts.

mail problem (mail server is running) but mail() is not working.

I have installed PHP , Apache on WinXP . I am using php mail function but i am getting error i also have installed Argosoft mail server and it is running properly using port 25 and php.ini is also configured properly. But i m getting error

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 D:\Program Files\Apache Group\Apache2\htdocs\email.php on line 8

please tell me the reason.When page is loaded request goes to smptp server
here is the log produced by mail server when request goes to server.
SMTP server started. Listening on port 25
7/24/2006 3:48:57 PM - POP3 server started. Listening on port 110
7/24/2006 3:48:57 PM - IMAP server started. Listening on port 143
7/24/2006 3:48:57 PM - Web server started. Listening on port 80
7/24/2006 3:48:57 PM - Using normal message scheme, Size=5
7/24/2006 3:49:29 PM - { 1} START SMTP
7/24/2006 3:49:29 PM - Requested SMTP connection from [], ID=1
7/24/2006 3:49:29 PM - ( 1) Evaluation period has expired
7/24/2006 3:49:29 PM - SMTP connection with [] ended. ID=1
7/24/2006 3:49:30 PM - { 1} END SMTP
7/24/2006 3:50:15 PM - { 2} START Web
Please help me out i have visited a lot of forums but i did'nt find any solution for that.
I will thankul for this.
Jul 24 '06 #1
5 14132
1,754 Expert 1GB
Hi there,

open up your command prompt and type the following command to make sure you port 25 [smtp] is ready and listeing to incoming connection..

telnet localhost 25
Jul 25 '06 #2
4,258 Expert 4TB
I recall having this problem myself once. Reason was that I had
SMTP=localhost left in php.ini. After I changed it to a real mail server, e.g. SMTP=mail.provider.nl it ran.
Maybe this does not apply in your case, but ít is worth a try.

Ronald :cool:
Jul 25 '06 #3
i have run the command telnet localost 25 it gives the following result
501 Evaluation period has expired

Connection to host lost.

I am using cable net (LAN) how can ii ind my real server name????????
i have installed ARGOSOFT smtp server but wen it is started it gives thhe following messege i think problem is with this mail server. When it gets started it gives the ollowing messege
Mail server appaears to be started but incoming requests may not be accepted.
Jul 27 '06 #4
hi bilal ...
i was getting that error too ... after trying many options this works for me ...
in your c:\windows\php.ini go to this section:

[mail function]
; For Win32 only.
SMTP = writehereyoursmtpserver
smtp_port = 25

; For Win32 only.
sendmail_from = writeheremiuser@myemailserver

uncomment that lines , save your php.ini, restart your http server and try again sending email using your form :D ...

greetings ...
Jul 28 '06 #5
Well if the server is not yours then what you can do is try sending an smtp mail instead of using phpmail function. Search in google fpr further information.


Jyot Vakharia
Aug 4 '06 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Bruce W...1 | last post: by
3 posts views Thread by Ibrahim. | last post: by
8 posts views Thread by Robert Dufour | last post: by
11 posts views Thread by Ed Bitzer | last post: by
reply views Thread by NeoPa | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.