objective-c - 测试gmail帐户是否存在

标签 objective-c

我想在我的应用程序中使用 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/

相关文章:

ios - CoreData:NSFetchedResultsController一对多对多关系

ios - 子 Controller 更新父 TableView 中单元格的标签

ios - 在 Objective-C 中进行比较 - 使用 ARC 不允许将 'int' 隐式转换为 'id'

objective-c - 打开 MainMenu.xib 时出错

iphone - 我的应用程序如何发送带有照片的彩信?

ios - 在呈现另一个 View Controller 时,如何阻止 "from" View 变黑?

iphone - 在 ios 中, View Controller 中移动 subview 以处理旋转的正确位置在哪里?

ios - 应用内截图并附加到电子邮件 IOS

iphone - 将 NSMutableArray 的 UIButtons 标题分配给 NSMutableArray 的 UIButtons?

objective-c - iOS中不规则形状的碰撞检测