我在使用Azure管道访问imap.gmail.com时遇到问题

问题描述

自动化脚本的硒中,我必须从外部测试用户 something@gmail.com )检索MFA代码。我正在使用此代码与IMAP gmail传入服务器通信 using (ImapClient client = new ImapClient(GmailHostName,993,email,ClientEmailPassword,AuthMethod.Login,true)) 当我在本地运行此测试时,它可以成功从Gmail帐户获取MFA代码。但是在 Azure Devops Pipeline 中,同一测试无法检索代码。这是来自Azure的错误System.Net.sockets.socketException : A connection attempt Failed because the connected party did not properly respond after a period of time,or established connection Failed because connected host has Failed to respond 108.177.122.109:993

   at S22.Imap.ImapClient.Connect(String hostname,Int32 port,Boolean ssl,RemoteCertificateValidationCallback validate)```
   at S22.Imap.ImapClient..ctor(String hostname,String username,String password,AuthMethod method,RemoteCertificateValidationCallback validate)

Has anyone faced an issue like this? Any and all help will be highly appreciated.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)