Sandy_ios
Sandy_ios

Reputation: 667

To test whether gmail account exists or not

I want to login using gmail in my app is it possible to test whether the given gmail a/c exists or not programmatically in objective c.

Upvotes: 2

Views: 3260

Answers (1)

jacktheripper
jacktheripper

Reputation: 14239

Run these commands:

telnet gmail-smtp-in.l.google.com 25
ehlo
mail from: <[email protected]> //can be any made up email
rcpt to: <[email protected]> //the email of the user you want to check

Please note you must include the greater and less than or equal to signs.

If you get OK followed by a string returned, the email is valid. Anything else, and an error will have been returned (ergo, the email is invalid).

Upvotes: 3

Related Questions