PowerShell tips for using Hotmail account to send mail _powershell

Source: Internet
Author: User
Tags mailmessage

Sending a message on a lower version of PowerShell can take advantage of the. NET System.net.mail.smtpclient class. Available commands can be used in the PowerShell of the high version: Send-mailmessage

I encountered an error while trying to use Hotmail:

Send-mailmessage:the SMTP Server requires a secure connection or the client is not authenticated. The server response was:5.7.0 must issue a 
STARTTLS command a

It was later found that no port number was specified and should use: 587 port number.

Send-mailmessage-body ' test '-smtpserver smtp.live.com-from appana@outlook.com-to ' admin@pstips.net '-subject ' test '- Usessl-credential I@outlook.com-port 587

General error Troubleshooting:

Whether the mailbox opens the SMTP service
The account number and password are entered correctly
Port number is correct

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.