When Trying to connect to a Gmail mail account the internet connection appears to drop or hick up while the mail server is sending a connection response back causing the program to hang and never return a response or timeout, because it has only received a partial packet back.
Since this has gone so long without suggestions, I won't feel bad about suggesting that you try MailKit instead. All of MailKit's APIs have the ability to be cancelled via CancellationTokens making this much less of a problem.
When Trying to connect to a Gmail mail account the internet connection appears to drop or hick up while the mail server is sending a connection response back causing the program to hang and never return a response or timeout, because it has only received a partial packet back.