views:

1080

answers:

1

Hello,

I am running a local apache server on an ubuntu machine, and i am trying to use the phpmailer class to send mail. It tries to connect by fsockopen to the mail server, but it throws a timeout error. I tried setting the timeout to 15sec with no luck. It does work on other machines.

How can i find out if my ISP has blocked requests ? The mail server responds to ping.

+1  A: 

ping and SMTP command don't go via the same port ; it is possible that one port is opened, and not the other one.

If there is a timeout, it probably means that :

  • either your SMTP server is not accepting connections from your server
  • or there is something somewhere (like a firewall) that's blocking your requests.

If you have an ssh access to the server, using telnet in command line to try to connect to the SMTP server, and send SMTP commands, might allow you to get some more informations...

Here a couple of links that show examples of an SMTP session via telnet :

If you cannot connect to the server, maybe you'll get some error message (telling you that you are not allowed to connect, for instance), or it'll timeout again... Which probably means your request are being blocked somewhere...

In that case, check with your network administrator ; maybe he'll have some idea about opening some port on the firewall.

Pascal MARTIN
thanks, my ISP was blocking port 25
solomongaby