我想在我的应用程序中使用 gmail 登录,是否可以在 objective-c 中以编程方式测试给定的 gmail a/c 是否存在。
最佳答案
运行这些命令:
telnet gmail-smtp-in.l.google.com 25
ehlo
mail from: <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4e232b0e2b362f233e222b602d2123" rel="noreferrer noopener nofollow">[email protected]</a>> //can be any made up email
rcpt to: <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="582b37353d3637363d20312b2c31363f2d2b3d2a183f35393134763b3735" rel="noreferrer noopener nofollow">[email protected]</a>> //the email of the user you want to check
请注意,您必须包含大于号和小于等于号。
如果您收到“OK”并返回字符串,则电子邮件有效。任何其他内容,都会返回错误(因此,电子邮件无效)。
关于objective-c - 测试gmail帐户是否存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11737599/