Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Send-MailMessage not working...what would you suggest that I try...?

$
0
0
Powershell
Send-MailMessage-to"pr@xxx.com"-from"pr@xxx.com"-subject"test"-SmtpServer"server.xxx.com"-UseSsl

I 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


Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>