imapx
imapx copied to clipboard
how to use TLS 1.2?
Hi,
we try to implement a script on a Server 2019. I have to enable TLS1.0 and TLS1.1 (client) for it to work... can I somehow force usage of TLS1.2 with imapx?
https://github.com/azanov/imapx/issues/19#issuecomment-432969814
Have not checked it, though.
found it, this works
$imap.SslProtocol = [Net.SecurityProtocolType]::Tls12
found it, this works
$imap.SslProtocol = [Net.SecurityProtocolType]::Tls12
Thanks, finaly I established a succesfull connection, but for some reason, this parameter works only if added after other connection parameters, heres an example
This doesnt work:
$client = New-Object ImapX.ImapClient $client.SslProtocol = [Net.SecurityProtocolType]::Tls12 $client.Behavior.MessageFetchMode = "Full" $client.Host = "mail.example.com" $client.Port = 993 $client.UseSsl = $true $client.Connect()
This works:
$client = New-Object ImapX.ImapClient $client.Behavior.MessageFetchMode = "Full" $client.Host = "mail.example.com" $client.Port = 993 $client.UseSsl = $true $client.SslProtocol = [Net.SecurityProtocolType]::Tls12 $client.Connect()