How do I put the secure string password to the get email activities

I use Windows Credential Manager to store the login and the password to log in to gmail. It returns a security string in password, let’s say, “sstr_password”. When I use the Get POP3 activity, it requires a string as the password, hence I can’t simply put “sstr_password”. The way “sstr.password.ToString” also doesn’t work as the exception of login failed shows up. How do I do it correctly?

Hi @MGMKLML, you might want to convert your secure string to string .
String s = new System.Net.NetworkCredential(String.Empty, sstr_password).Password;

Hope it works. :slight_smile:

@quihan yeah thank you it worked :slight_smile:
Could you also please tell me how to properly configure the IMAP thing?
I always get an exception like the host is unknown: 0x800040005

@MGMKLML, Looks like there’s something wrong with your configuration. Did you insert the right Port and Server ?

@quihan, I tried the ports: 143 and 993
The server is: "“

Are you using the Get IMAP Mail Messages activity? Port 993 and Server “” should work fine.

@quihan, Yeah I’m using this activity :frowning: And I enabled the IMAP thing in the settings. And you can access from less secure apps. And the Get POP3 activity works fine.

@quihan, found out that I put instead of

Haha. Hope its working fine now.

@quihan, Yes it is :slight_smile:

Sweet. Happy Automating :slight_smile: