Powershell
Send-MailMessage-to"pr@xxx.com"-from"pr@xxx.com"-subject"test"-SmtpServer"server.xxx.com"-UseSslI type the following code above (PowerShell 5).
I get the error below.
I would like to know what is the problem.
Could you please tell me what kind of commands I should run to find out what is causing this problem...?
Send-MailMessage : Unable to connect to the remote server
At line:1 char:1
+ Send-MailMessage -to "pr@xxx.com" -from "pr@xxx.com" -subje ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpException
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage