天天看点

PowerShell发送邮件(587)

发送html格式邮件(图片位于可访问站点上)

发送邮件,正文包含的图片位于本地计算机

$smtp.UseDefaultCredentials = $false 要放在SmtpClient.Credentials之前

 If the UseDefaultCredentials property is set to false, then the value set in the Credentials property will be used for the credentials when connecting to the server. If the UseDefaultCredentials property is set to false and the Credentials property has not been set, then mail is sent to the server anonymously.