Problem with fsockopen() (Not Firewall Related)

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
Armorfist
Forum Newbie
Posts: 2
Joined: Tue Mar 10, 2009 7:15 am

Problem with fsockopen() (Not Firewall Related)

Post by Armorfist »

Hello,

I just downloaded Swift Mailer 4, but I'm having difficulties sending mail with SMTP. It returns the following error:
Message: fsockopen() [function.fsockopen]: unable to connect to :25 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. )

Filename: Transport/StreamBuffer.php

Line Number: 243
Its not a firewall problem as I can connect with the following code:

Code: Select all

 
       $fp = fsockopen ($url, 25, $errno, $errstr, 30);
                if ($fp) {
                        echo "Congratulations: FSock seems to be working properly on your server.";           
                        fclose ($fp);
                }
 
Anyone has any ideas?

Thanks,
Frederico
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Problem with fsockopen() (Not Firewall Related)

Post by Chris Corbyn »

It looks like there's an error in your code:
unable to connect to :25
The bit before the colon is supposed to be the SMTP server address (e.g. smtp.host.tld:25). Undefined variable perhaps? fsockopen() is probably defaulting to 0.0.0.0:25 and dying.
Armorfist
Forum Newbie
Posts: 2
Joined: Tue Mar 10, 2009 7:15 am

Re: Problem with fsockopen() (Not Firewall Related)

Post by Armorfist »

Stupid me. It was an undefined variable. Working perfectly now!

Thank you very much and great job on Swift, I love it!
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Problem with fsockopen() (Not Firewall Related)

Post by Chris Corbyn »

Good job :) Easy mistake to make.
pacella
Forum Newbie
Posts: 1
Joined: Thu Nov 12, 2009 5:11 am

Re: Problem with fsockopen() (Not Firewall Related)

Post by pacella »

How can i get limewire to work when a firewall is on? For example, when i downloaded limewire, it said that limewire could not turn on because of a firewall program.
Last edited by pacella on Mon Jun 14, 2010 1:36 am, edited 1 time in total.
anindeeta
Forum Newbie
Posts: 1
Joined: Sat Feb 13, 2010 12:11 am

Re: Problem with fsockopen() (Not Firewall Related)

Post by anindeeta »

How do I stop a firewall from my work computer? I am a teacher and I work part-time @ home as an independent agent. The schedule to grab hours for my second job rolls out while I am teaching. I cannot open the schedule from my work computer because there is a firewall...it is unable to open application "tubsock". I have tried using a laptop but you can not see the rollout schedule on a Mac. Any suggestions? Please help!
__________________________
affiliateelite ~ affiliateelite.com ~ adgooroo ~ adgooroo.com
Last edited by anindeeta on Sat Feb 20, 2010 12:21 am, edited 1 time in total.
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Problem with fsockopen() (Not Firewall Related)

Post by AbraCadaver »

How do I stop a firewall from inhibiting my success with beautiful women? Error is: Deny TCP (no connection)...
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply