PowerShell Send-MailMessage 和 Microsoft Exchange 2007
PowerShell Send-MailMessage and Microsoft Exchange 2007
我在使用 Microsoft Exchange 2007 发送电子邮件时遇到问题。
我在另一台机器上使用了完全相同的 powershell 代码并发送了电子邮件。
它给出的错误信息是:
Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Unable to relay
At C:\Users\alex\Desktop\Email.ps1:37 char:29
+ Send-MailMessage <<<< @Parameters
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpFailedRecipientException
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage
我该如何解决这个问题?
您用于中继的接收连接器可能没有您作为 运行 脚本来源的计算机的 IP 地址。您需要在 Exchange 服务器上进行检查。
我在使用 Microsoft Exchange 2007 发送电子邮件时遇到问题。
我在另一台机器上使用了完全相同的 powershell 代码并发送了电子邮件。
它给出的错误信息是:
Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Unable to relay
At C:\Users\alex\Desktop\Email.ps1:37 char:29
+ Send-MailMessage <<<< @Parameters
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpFailedRecipientException
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage
我该如何解决这个问题?
您用于中继的接收连接器可能没有您作为 运行 脚本来源的计算机的 IP 地址。您需要在 Exchange 服务器上进行检查。