PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 9th, 2013, 08:58 AM
paulh1983 paulh1983 is online now
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2004
Posts: 2,236 paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 11 h 48 sec
Reputation Power: 201
PHP-General - Email verification scripts - connection being refused

I was looking for email verification scripts. When I test these out with examples, hotmail etc refuse my connection

Warning: fsockopen() [function.fsockopen]: unable to connect to mx2.hotmail.com:25 (Connection refused

Q: so how else should i be trying to verify email addresses?

i know it is not 100% unless I email the address.

script example that i used:

1. http://code.google.com/p/php-smtp-email-validation/

Reply With Quote
  #2  
Old January 9th, 2013, 09:24 AM
portcitysoftwar portcitysoftwar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 163 portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 13 h 18 m 54 sec
Reputation Power: 17
Does your webhost support fsock

Quote:
Originally Posted by paulh1983
I was looking for email verification scripts. When I test these out with examples, hotmail etc refuse my connection

Warning: fsockopen() [function.fsockopen]: unable to connect to mx2.hotmail.com:25 (Connection refused

Q: so how else should i be trying to verify email addresses?

i know it is not 100% unless I email the address.

script example that i used:

1. http://code.google.com/p/php-smtp-email-validation/

Reply With Quote
  #3  
Old January 9th, 2013, 10:07 AM
paulh1983 paulh1983 is online now
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2004
Posts: 2,236 paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 11 h 48 sec
Reputation Power: 201
thanks for the reply. It is enabled but not working on that particular script

i say it is working as a test script worked fine

Last edited by paulh1983 : January 9th, 2013 at 10:11 AM.

Reply With Quote
  #4  
Old January 9th, 2013, 11:13 AM
Rhytz's Avatar
Rhytz Rhytz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2011
Posts: 100 Rhytz User rank is Sergeant Major (2000 - 5000 Reputation Level)Rhytz User rank is Sergeant Major (2000 - 5000 Reputation Level)Rhytz User rank is Sergeant Major (2000 - 5000 Reputation Level)Rhytz User rank is Sergeant Major (2000 - 5000 Reputation Level)Rhytz User rank is Sergeant Major (2000 - 5000 Reputation Level)Rhytz User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 11 h 4 m 50 sec
Reputation Power: 50
Are you sure you are using the correct server?

mx2.hotmail.com:25 seems unlikely to be the correct server to me. Why are you not using the SMTP server of the webhost?
__________________
Post to Facebook using a Nokia 3310

Reply With Quote
  #5  
Old January 9th, 2013, 12:35 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,711 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 6 h 48 m 5 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
mx2.hotmail.com is an MX record for both @hotmail.com and @msn.com so that looks right.

Some mail servers will block connections or emails from blacklisted (eg, Spamhaus) sources. Depending how paranoid your verification needs to be, I might simply check if there is at least one MX record that resolves to an IP address.

Reply With Quote
  #6  
Old January 9th, 2013, 12:39 PM
paulh1983 paulh1983 is online now
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2004
Posts: 2,236 paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 11 h 48 sec
Reputation Power: 201
thanks

well i am using the script i found on the net so going along with whatever they are doing.

I changed the port from 25 to a random one but now the server hangs and i get an apache error

Reply With Quote
  #7  
Old January 9th, 2013, 01:01 PM
paulh1983 paulh1983 is online now
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2004
Posts: 2,236 paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 11 h 48 sec
Reputation Power: 201
Hi Requinix,

thanks for that but what that script is doing is sending a "hello" message to check whether the actual email is valid and not just the domain part.

i.e. validemail@hotmail.com and invalidemail@hotmail.com both will have a "true" domain and hence a true MX record.

Any other script would be helpful

Reply With Quote
  #8  
Old January 9th, 2013, 01:30 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,711 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 6 h 48 m 5 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
A HELO? You mean trying a RCPT TO?

That's how you would do it, but if you can't connect then all the verification scripts in the world won't help. Can you connect to mx2.hotmail.com yourself from that machine?

Reply With Quote
  #9  
Old January 9th, 2013, 05:11 PM
paulh1983 paulh1983 is online now
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2004
Posts: 2,236 paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 11 h 48 sec
Reputation Power: 201
ok i have tried again and this is the response I got from hotmail:


220 BAY0-MC4-F26.Bay0.hotmail.com Sending unsolicited commercial or bulk e-mail to Microsoft's computer network is prohibited. Other restrictions are found at http://privacy.microsoft.com/en-us/anti-spam.mspx. Wed, 9 Jan 2013 15:09:03 -0800

Does this mean I won't be able to get info from hotmail?

Reply With Quote
  #10  
Old January 9th, 2013, 06:17 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,711 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 6 h 48 m 5 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
No, getting that announcement (which is what it is) is good. Are you saying the script works now, or at least isn't generating the "connection refused" errors?

Reply With Quote
  #11  
Old January 9th, 2013, 09:35 PM
portcitysoftwar portcitysoftwar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 163 portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 13 h 18 m 54 sec
Reputation Power: 17
Your webhosts IP may be banned from msn servers due to other users using the host to send spam.

Have you tried using the php mail extension and sending an email validation link? that way you know that it is valid and belongs to the user

Quote:
Originally Posted by requinix
No, getting that announcement (which is what it is) is good. Are you saying the script works now, or at least isn't generating the "connection refused" errors?
Comments on this post
aeternus agrees: In addition this ensures (in the long run) that the client activly marks the mail as 'not spam' if
needed

Reply With Quote
  #12  
Old January 10th, 2013, 04:02 AM
paulh1983 paulh1983 is online now
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2004
Posts: 2,236 paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 11 h 48 sec
Reputation Power: 201
Well i tried that script from my installation on Linux rather than through my web hosting company and that is when it appeared to work.

when I tried to check an email address hosted by another company, I actually recieved the response saying whether the email was valid or not. but when I try the hotmail one, it seems that this message is a generic one they respond with without actually telling us whether the email in question is valid or not.

Reply With Quote
  #13  
Old January 11th, 2013, 10:01 PM
portcitysoftwar portcitysoftwar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 163 portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 13 h 18 m 54 sec
Reputation Power: 17
Why are you checking just the validity/existance of the email rather than checking for ownership of the email??

Reply With Quote
  #14  
Old January 14th, 2013, 03:30 AM
paulh1983 paulh1983 is online now
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2004
Posts: 2,236 paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 11 h 48 sec
Reputation Power: 201
well I was asked by my manager whether when user sign up to our services//competitions, if there is a way we could check if the emails entered actually exist. for example: abc@hotmail.com may be a valid format but not necessarily exist.

But you know what, you have posed a valid question, if we dont check for the ownership then anyone can put an email address for another person..

Reply With Quote
  #15  
Old January 14th, 2013, 02:31 PM
portcitysoftwar portcitysoftwar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 163 portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level)portcitysoftwar User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 13 h 18 m 54 sec
Reputation Power: 17
Yes and you will be in violation of many laws and TOS agreements with email providers resulting in your domain, associated ip's and email addresses being black listed.

You should create a truly random id, store the id with their name and email address, email the id to the user within a URL link requesting both the userid and unique id via get method.

This will bypass the issues of mail servers not providing results to your whois searches of email addresses, and provide more useful data.

Quote:
Originally Posted by paulh1983
well I was asked by my manager whether when user sign up to our services//competitions, if there is a way we could check if the emails entered actually exist. for example: abc@hotmail.com may be a valid format but not necessarily exist.

But you know what, you have posed a valid question, if we dont check for the ownership then anyone can put an email address for another person..

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Email verification scripts - connection being refused

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap