Gustavo Carlos Pazos

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromGustavo Carlos Pazos
ToMe
SubjectSome errors when validating email address
Date14 June 2009 20:46
Hi!

My name is Gustavo and I'm developing my own website. I found your email
validation script very useful and I'm trying to implementing it in my
website. I get an error when I'm testing the validation with email accounts
like @gmail.com or @hotmail.com that not occurs in your demo at
http://www.howtocreate.co.uk/php/emailtools.php.
The error is:

*Warning*: fsockopen() [function.fsockopen <[URL]>]: unable to connect to
[URL]:25 (Connection refused) in */path/to/validateEmail.php* on line *90*

You can see de implementation of the script at [URL]. The hosting uses PHP5
and I'm using your script in the validating mode.

Do you have any idea what could be wrong?

Thanks in advance,

Gustavo
FromMe
ToGustavo Carlos Pazos
SubjectRe: Some errors when validating email address
Date14 June 2009 22:26
Gustavo,

> unable to connect to [URL]:25 (Connection refused)

If you get this on every email domain, it means your hosting service has
blocked you from opening SMTP connections. If you get it only for certain
domain names when you know they should work, it means those email service
providers have blocked your server from creating SMTP connections to them.

It's quite likely that they have decided to blacklist your server or its IP
address for whatever reason - perhaps some other site hosted on the same IP
address was sending abusive/spam mails to them. In that case, you probably
also cannot send emails to those domains using the PHP Mail function (unless
your ISP routes outgoing mail through another server with a different IP
address).

You should speak to your hosting service, or the postmaster at the target
domain names, to work out why the connection was refused.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromGustavo Carlos Pazos
ToMe
SubjectRe: Some errors when validating email address
Date15 June 2009 02:54
Thank you for your quickly answer,

Yes, you are right, testing with another domains I get the same error but
testing with the same domain I don't get errors.

However I've implemented another script to complement yours
(class.phpmailer.php and class.smtp.php) and I can send mail to my gmail.com
and hotmail.com emails using SMTP connections from this account without
problem. This script uses the fsockopen() function too.

Another question: when I get that "Connection refused", then my hosting
service provider is who refusing connections?

Thanks,

Gustavo
FromMe
ToGustavo Carlos Pazos
SubjectRe: Some errors when validating email address
Date15 June 2009 10:46
Gustavo,

> Another question: when I get that "Connection refused", then my hosting
> service provider is who refusing connections?

If all email domains give that error; yes. If only a few do; no.
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.