By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,900 Members | 1,378 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,900 IT Pros & Developers. It's quick & easy.

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

P: 2
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 127.0.0.1 [127.0.0.1], ID=1
7/24/2006 3:49:29 PM - ( 1) Evaluation period has expired
7/24/2006 3:49:29 PM - SMTP connection with 127.0.0.1 [127.0.0.1] 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
Share this Question
Share on Google+
5 Replies


sashi
Expert 100+
P: 1,754
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

ronverdonk
Expert 2.5K+
P: 4,258
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

P: 2
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

P: 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

P: 1
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.

Thanks

Jyot Vakharia
Aug 4 '06 #6

Post your reply

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