tags:

views:

27

answers:

2

So, I'm trying to get my html form hosted on the company I work for's intranet to be submitted to several email addresses using PHP. I am testing the code using XAMPP, and everytime I try to submit, I get this error:

*Warning: mail() [function.mail]: Failed to connect to mailserver at "172.23.38.10" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\XAMPP\xampplite\htdocs\Form\mailer.php on line 25*

I changed the php.ini file located in \XAMPP\xampplite\php\ as follows

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = 172.23.38.10
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = [email protected]

Any idea as to why this isn't working? Also, can anyone suggest an alternative way to be able to submit a feedback form to an email address in a local Intranet? Thanks.

A: 

Well, here is an alternative...

I had a similar problem, so I wrote this script, as long as your mail (presumably Exchange) server allows Telnet access this should work fine: djgdesign telnet email script

Chief17
A: 

The error you get self-explain everything, there's no SMTP server at 172.23.38.10:25. php mail() won't work if you dont't have a working outgoing mail server.

I suggest you to reconfigure PHP to use your ISP's SMTP.

youssef azari