Jump to content

Warning: mail()


xwielder

Recommended Posts

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 = myself@mysite.com

# 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\www.mysite.com\myform.php 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.
Link to comment
Share on other sites

[img]http://www.thecomputerprofessional.com/mailerror/_images_/screenshot007.jpg[/img]

SMTP and SNMP are both running.

Windows Firewall is turned off and I'm not running any other type of firewall at all.
(I turned it all off to troubleshoot this problem)

[attachment deleted by admin]
Link to comment
Share on other sites

** UPDATE **

I would just like to say that I've resolved my issue.

Here is how it was resolved:

I downloaded the SMTPDIAG tool from microsoft and ran it.

Everything was passing except for the last part which gave me an "Error 10053"

After googling that error, I was pointed here:  http://kbase.pscs.co.uk/index.php?article=242


It seems that McAfee was blocking port 25.  After unchecking the block, presto.  I can telnet port 25 and continue all SMTP functions normally.

I no longer receive the original error message that prompted this entire investigation.

I wish to thank all of you who replied and/or read this post.

Cheers to all.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.