无法从Azure自动化帐户发送电子邮件

问题描述

尝试从Azure发送电子邮件

$Credential = Get-AutomationPSCredential -Name '[email protected]'

$Username = $Credential.Username

$Password = $Credential.GetNetworkCredential().Password

 

[securestring]$SecurePassword = ConvertTo-securestring $Password -AsPlainText -Force

[pscredential]$PSCredential = New-Object System.Management.Automation.PSCredential ($Username,$SecurePassword)

 

$Username

$Password

PS code

但是,我收到此错误。曾经尝试过使用Google,但找不到真正的解决方案或解释。也许你们中的一些人已经和这个亲密了?

我们遇到的错误是:

Send-MailMessage : The SMTP server requires a secure connection or the client was not authenticated. The server

response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

[AM7PR03CA0008.eurprd03.prod.outlook.com]

At line:26 char:1

+ Send-MailMessage @mailParams

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage],SmtpException

    + FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage

非常感谢您。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)