I am facing issue with accessing imap.gmail.com in azure pipeline

188 views Asked by At

In selenium for my automation script I have to retrieve MFA code from my external test user([email protected]). I am using talking to the IMAP gmail incoming server with this code using (ImapClient client = new ImapClient(GmailHostName, 993, email, ClientEmailPassword, AuthMethod.Login, true)) When I run this test locally it works successfully getting the MFA code from gmail account. But in Azure Devops Pipeline the same test fails to retrieve the code. This is the error from 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, Int32 port, String username, String password, AuthMethod method, Boolean ssl, RemoteCertificateValidationCallback validate)

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

0

There are 0 answers