Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375

    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/
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    165
    Rep Power
    18
    Does your webhost support fsock

    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/
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375
    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.
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    105
    Rep Power
    51
    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
  8. #5
  9. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,066
    Rep Power
    9398
    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.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375
    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
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375
    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
  14. #8
  15. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,066
    Rep Power
    9398
    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?
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375
    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?
  18. #10
  19. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,066
    Rep Power
    9398
    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?
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    165
    Rep Power
    18
    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

    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
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375
    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.
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    165
    Rep Power
    18
    Why are you checking just the validity/existance of the email rather than checking for ownership of the email??
  26. #14
  27. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2004
    Posts
    2,989
    Rep Power
    375
    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..
  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    165
    Rep Power
    18
    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.

    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..
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo