简体   繁体   English

从 azure webapp 触发带有 TLS 1.0 的电子邮件

[英]triggering emails with TLS 1.0 from azure webapp

We are running small .net application in azure webapps which collects data and trigger.ps1 file to send email via powershell send-mailmessage We are running small .net application in azure webapps which collects data and trigger.ps1 file to send email via powershell send-mailmessage

.Netversion: 4.8 platform = 32bit HTTP version: 1.1 Minimum TLS Version: 1.2 HTTPS Only: Off .Netversion:4.8 平台 = 32 位 HTTP 版本:1.1 最低 TLS 版本:1.2 HTTPS 仅:关闭

Now the issue is mails are sending with TLS1.0, as you are aware TLS 1.0 not support in future we wanted to enforce it to TLS 1.2, on webapp TLS settings enabled TLS as 1.2 but still taking it as 1.0 only现在的问题是使用 TLS1.0 发送邮件,因为您知道 TLS 1.0 将来不支持我们希望将其强制执行到 TLS 1.2,在 webapp TLS 设置上启用 TLS 为 1.2 但仍将其仅作为 1.0

where as while sending same from local powershell its taking TLS2.0, please help me on how to send to emails with minimum TLS 1.2在从本地 powershell 发送相同内容时,它采用 TLS2.0,请帮助我如何发送到具有最低 TLS 1.2 的电子邮件

You can force Powershell to use TLS 1.2 by adding below command in your PowerShell profile:您可以通过在 PowerShell 配置文件中添加以下命令来强制 Powershell 使用 TLS 1.2:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

It's probably better to include the command in any script which uses the Send-MailMessage cmdlet.最好将命令包含在使用Send-MailMessage cmdlet 的任何脚本中。

The issue has been known for a while and other email platforms also insist on TLS 1.2 connection and use the same solution for PowerShell (here's an example ).这个问题已经有一段时间了,其他 email 平台也坚持使用 TLS 1.2 连接,并对 PowerShell 使用相同的解决方案(这里是一个示例)。

Do check out Force PowerShell to Use TLS 1.2 .请查看Force PowerShell to Use TLS 1.2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM