SMTP/fsockopen Problem.. (think firewall is blocking port)

Status
Not open for further replies.

zizou81

New Member
Messages
13
Reaction score
0
Points
0
My petition script is malfunctioning.. :p

it gives me the following error;
Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.gmail.com:465 (Connection timed out) in /home/zizou81/public_html/foppe/phpmailer/class.smtp.php on line 105
OOPS... There was an error sending the messageq

The Petition script I'm using; http://petitionscript.net/phpPETITION2/index.php

My guess is that the firewall is blocking the SMTP port, the script's default port is set to 25, I've changed it to 465 (don't ask why, I have no idea). But both didn't work.

I think my forum account is linked to my host-account, but the name is the same as my forum name :)

Thank you.
 

DizzyTechnology

New Member
Messages
500
Reaction score
0
Points
0
Use the other SSL port, 587. Corey unblocked that.

Also, make sure the address you are using is ssl://smtp.gmail.com, or else it won't work.
 

zizou81

New Member
Messages
13
Reaction score
0
Points
0
Thank you, I'll double check the script right now.

(I must say, GREAT support, also that live thingy is nice)
Edit:
Still getting Errors;

OOPS... There was an error sending the messageq

Yay for detailed error handling ;_;

Anyone any idea?

(Sorry for double post, had to get attention :( )
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
I made some changes try again.

-Corey
 

zizou81

New Member
Messages
13
Reaction score
0
Points
0
Thanks, just woke up, I'll give it another shot =)

EDIT, ok, so I changed the ports to 587, use ssl://smtp.gmail.com as host (right?) (also tried with tsl) and still get the oops thingy without any detailed information ;_;

EDIT2:

So I was googling for phpmailer & gmail, instead of using ssl://smtp.gmail.com I added another variable..

Still no succes. >_<

*keeps googling*

Edit3;

After googling, I got to a page where they had a 'patched' class.phpmailer.php that required me to make a file called mail.php with some etoher variables (defining the username/pw/ etc.) anyway, it gave me new errors ;_;

Code:
Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in /home/zizou81/public_html/foppe/phpmailer/class.smtp.php on line 105

Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /home/zizou81/public_html/foppe/phpmailer/class.smtp.php on line 105

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:587 (Unknown error) in /home/zizou81/public_html/foppe/phpmailer/class.smtp.php on line 105
Message was not sent
Mailer Error: Language string failed to load: connect_host
Edit:
I gave up on using gmail for this phpmailer thing, I just used a free email with smtp support WITHOUT ssl :) (still uses 587 port though and smtp authj) but it's working 8)

Thanks for all the help though, this topic can get locked I think.
 
Last edited:

Prophet

New Member
Messages
17
Reaction score
0
Points
1
Having the same issue - How and what free smtp did you use?

TY - Holla!!!
I am assuming that sending emails from server is not allowed.
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Sending email from the server is allowed. Spamming is not ;)
 

bityugov

New Member
Messages
8
Reaction score
0
Points
0
Failed to connect to localhost:25 [SMTP: Failed to connect socket: Connection refused (code: -1, response: )]

From horde. Normal e-mail don't get delivered also. I tried to send an e-mail to myself.
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
On your failed to connect how did you try to connect?
 

zizou81

New Member
Messages
13
Reaction score
0
Points
0
I think you get that error becuase port 25 is blocked.. (or not used by your email provider)

The free email I'm using is 'bluebottle' (please remove if this kind of advertisement is not allowed)
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
I think zizou is right, I am able to use 25 fine.
 
Status
Not open for further replies.
Top