OS: Windows Server 2003 SP1 Standard Edition
Web Server: Apache 2.0.59
MySQL: MySQL 5.0.24a
PHP: PHP 5.2.0
SMTP: IIS
POP3: Windows Server Built in POP3 service
[This is all on my personal machine.]
### Data within my php.ini file
[mail function]
; For Win32 only.
SMTP = 192.168.0.10
smtp_port = 25
; For Win32 only.
sendmail_from = [email]myself@mysite.com[/email]
# Note: The php.ini file is in the C:\WINDOWS directory and yes, that's where it's being referenced from.
# Note: Registered Globals are set to ON
Here is my error
Warning: mail() [function.mail]: Failed to connect to mailserver at "192.168.0.10" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Apache2\htdocs[url]www.mysite.com\myform.php[/url] on line 75
### Mail function of myform.php
Line(57) <?php
Line(58) if ($StaffName)
Line(59) {
Line(60) $yeshow = "
Line(61) Summary notes/comments:
Line(62) -----------------------
Line(63)
Line(64) $Summary_notes_comments
Line(65)
Line(66) -----------------------
Line(67) FROM: $StaffTitle-$StaffName
Line(68) DEPARTMENT: $DEPARTMENT";
Line(69) }
Line(70)
Line(71) mail($toemail,"$subject","
Line(72)
Line(73) $yeshow
Line(74)
Line(75) ","From: $StaffName");
Line(76)
Line(77) header("Location: $sendpage");
Line(78) exit();
Line(79) }
Line(80) ?>
There should be absolutely no reason (that I can see) why I receive the mail() error as stated above.
This has worked flawlessly in the past for over a year, but has failed to work recently.
For ScreenShots of my IIS SMTP settings, they're here: http://www.TheComputerProfessional.com/mailerror
If there's any other info you need to know and/or see to further troubleshoot this error, please let me know and I'll provide it.