| Posted by oopsbabies on 01/04/07 14:59 
Hi,
 Thank you for your response.
 
 I looked into the site you have provided and I assure you that my code
 to use the mail(..) is 100% correct. I have also consulted other sites
 for the correct use of the mail(..) functions. I have set the necessay
 PHP variables for this.
 
 As you had suggested: I used the "telnet" program and when I try to
 connect to my ISP's SMTP server through the telnet it fails. I
 contacted my ISP and they also don't know the anwser on telnet's
 failure. I asked them about authentication requirement and they said no
 authentication is required. One thing is strange in that if I sent
 mails through MS-OUTLOOK all mails are sent correctly and received at
 the other end.
 
 It seems I am lost here...
 
 Noodle wrote:
 > oopsbabies@hotmail.com wrote:
 > > Hello everyone,
 > >
 > > I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My
 > > machine is using Windows XP 2002 professional edition which comes with
 > > a Windows firewall. I am using McAfee free edition for anti-virus.
 > >
 > > I use an ISP provider from my country and according to them I do not
 > > need to perform authentication while sending mails through their SMTP
 > > address. Thus I am using external SMTP server. I don't have IIS
 > > installed in my computer nor do I have an SMTP server running.
 > >
 > > I tried the PHP's mail(...) function but the function fails. It reports
 > > that the connection to the SMTP host cannot be made. I set the SMTP
 > > host using the ini_set function as well as editing the php.ini and
 > > specifying the host (then again restarting Apache server). This doesn't
 > > help. The mail function still fails with the same error. Disabled the
 > > Windows firewall and McAfee anti-virus. But the same problem persists.
 > >
 > > Thinking that I may have somehow messed up the header information or
 > > not properly using CRLF, I used the phpmailer class. The classes have
 > > been installed properly.
 > >
 > > The phpmailer's send(..) function also fails with the error:
 > >
 > > Debug Warning: C:\Program Files\Pcounter Web
 > > Report\www\libraries\class.smtp.php line 177 - fsockopen(): unable to
 > > connect to smtp.wlink.com.np:25
 > >
 > > I am using the default port that is 25. Verified that my ISP provider
 > > also uses port 25 for SMTP.
 > >
 > > I debugged the phpmailer class and the fsockopen(..) function fails as
 > > you can also see from the above error message.
 > >
 > > fsockopen function returns false.
 > >
 > > The $errno = 10053 and the $errstr = "An established connection was
 > > aborted by a software in your host machine"
 > >
 > > Again disabling the firewall and McAfee the same error is reported.
 > >
 > > Could the reason for the problem be that I am using quite old PHP and
 > > Apache version. I searched the entire php.net sites but the exact
 > > problem is not faced by anyone. I guess no one uses Apache 1.3.33
 > > anymore. Could the incompatibility between Apache and PHP causing this?
 > >
 > > Any help would be appreciated very much
 >
 > The Apache and PHP version shouldn't matter. I've written a short
 > tutorial on congifuring mail for PHP here:
 > http://www.neilang.com/2006/12/php-sending-html-emails/
 >
 > To test the connection to the SMTP server from your computer you could
 > try to telnet straight to the SMTP server from command prompt.
 > Otherwise I recommend installing the mail server that comes with XP Pro
 > and setting that as your mail server. I've used this before and it
 > works great with PHP4 after some configuration.
 [Back to original message] |