SMTP Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Fearpig
Forum Newbie
Posts: 2
Joined: Thu Oct 19, 2006 6:36 am
Location: Midlands

SMTP Error

Post by Fearpig »

Hi Guys,
My form to e-mail script is giving me the following error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "fer-mail" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\Intranet v3\Process_Request_Form2.php on line 25

Can't send email
I've had a look at my 'Default SMTP Virtual Server' on exchange on my e-mail server and...

- TCP port is set to 25
- the Relay open to all
- connections are allowed by all
- anonymous, basic authentication and integrated windows authentication are all allowed

I've had a look on IIS on the webserver and...

- under 'Default SMTP Virtual Server' all the settings match the exchange server
- under the domain name 'Allow incoming mail...' has been ticked

I've had a look at the PHP.ini file and have the following details for the mail function...

[mail function]
; For Win32 only.
SMTP = fer-mail; for Win32 only
smtp_port = 25
;sendmail_from= me@localhost.com ; for Win32 only

; For Win32 only.
sendmail_from = me@mydomain.co.uk
;I did change this to match my real address

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

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =



Can anyone see where I am going wrong? As far as I can see this should all now be working.

Please Help!!!! :( [/quote]
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Try getting a command line up and running: `telnet fer-mail 25' then see if it fails or not.
User avatar
Fearpig
Forum Newbie
Posts: 2
Joined: Thu Oct 19, 2006 6:36 am
Location: Midlands

Post by Fearpig »

Hello d11wqt,
I tried what you suggested and got the following error message:

Connecting to fer-mail...Could not open connection to the host, on port 25: Connection failed


Any idea what that means? (Other than connection failed!)
Post Reply