Page 1 of 1

Send Mail problem.

Posted: Wed Jul 06, 2005 12:13 pm
by nasf
Hi ppl,

First of all, I have a free sendmail program (wich is in system path and I can send mail from the command line with no problems) in a Windows XP with Xampp 1.4.

When I try to send mail via php script it returns me an error: "mail cannot be sent because the connection to your mail server was interrupted...". Does anyone knows what's going on?

My php.ini:

...

[mail function]
; For Win32 only.
SMTP = my.smtp.server

; For Win32 only.
sendmail_from = my@email
; To send outside please use FQDN like 'sendmail_from = postmaster@localhost.org'

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; sendmail_path =

...

Thanks in advance.

NASF

Posted: Wed Jul 06, 2005 1:08 pm
by Burrito
using the correct port are you?

made sure you have the correct address for the smtp server have you?

tried another client (other than php, ie outlook) have you?

Posted: Wed Jul 06, 2005 1:08 pm
by Chris Corbyn
A few possibilities:

-- The SMTP server isn't the one your ISP uses and mail relaying was denied.
-- Your SMTP server requires authentication

I can't say I've seen that exact error before however. Have you sent mail via this SMTP from this machine before using a mail program such as Outlook or Evolution?

Posted: Wed Jul 06, 2005 4:01 pm
by nasf
I know that my ISP (SMTP and ports, included) is correct because is the same configured on Outlook and in sendmail program and they can send mail without problems.

The problem occours only when I use php mail functions!

Posted: Wed Jul 06, 2005 5:47 pm
by bokehman
First XAMPP uses mercury mailserver I believe. Are you sure the mailserver is running? Try 'telnet localhost 25' from the command line to be certain.

Also this:

[mail function]
; For Win32 only.
SMTP = my.smtp.server

needs to be the address of the mail server.In your case

[mail function]
; For Win32 only.
SMTP = localhost

should be good. Also you need to configure the mail server so authentication is not required from localhost.

Anyway try these two things and report back, and don't forget to restart the server after you have altered the php.ini file.