前言
通过Windows powershell脚本实现邮件发送
前提条件
- 开启wmi,配置网卡,参考
脚本说明解释
配置SMTP服务器信息
- $smtpServer = "smtp.qiye.163.com"
- $smtpPort = "25"
- $username = "XXXX@YOU_email"
- $password = "YOU_password"
邮件消息,邮件主题
- $fromAddress = "XXXX@YOU_email"
- $toAddress = "XXXX@YOU_email"
- $subject = "subject of an email"