You are here: Re: Not being able to send mails through PHP using SMTP « PHP Programming Language « IT news, forums, messages
Re: Not being able to send mails through PHP using SMTP

Posted by Gordon Burditt on 01/05/07 04:05

>I know a personal acquaintaince who works for the ISP.I talked to him
>and he assures that no authentication is needed. He is also a PHP
>programmer. Perhaps being inside the ISP's intranet he doesn't require
>one.

SMTP servers for a domain (e.g. the one the MX record is pointed
at) typically accept mail from anywhere (except hosts on the SPAM
block list) if the destination is for the domain being served
(subject to later filtering for SPAM and viruses). They may also
allow IP addresses local to the ISP itself to send mail out to
anyone. Neither requires authentication (but roaming customers not
connecting via the ISP's own network have a problem) to avoid
horrible spam abuse. (except by their own customers). The approach
of "POP before SEND" also doesn't require authentication on sending
mail, but requires you to check your mailbox within some time (e.g.
an hour) before sending.

>When I try the telnet command "open" with the ISP's SMTP address and
>the port 25, the function returns so abruptly (within a blink of an
>eye) with a connection failure message. But when tried with different
>port address (23) it takes some time for the failure message to come.
>Maybe this means something.

When I try telnet to the given server address in the original post,
and port 25, it connects and gives a SMTP banner. I doubt it's
operating as an open relay, but I did not test that.

>> > 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.

I'd like to suggest firewall problems, either on your end or between
you and the SMTP server.

>> > 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.

My experiments with telnet suggest that I can get a SMTP banner
using the above information, so the server is (at the moment) working.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация