Send mail via Gmail with PowerShell V2's Send-MailMessage

前端 未结 13 2053
一生所求
一生所求 2020-11-30 21:07

I\'m trying to figure out how to use PowerShell V2\'s Send-MailMessage with Gmail.

Here\'s what I have so far.

$ss = New-Object Security         


        
13条回答
  •  一向
    一向 (楼主)
    2020-11-30 21:14

    I agree with Christian Muggli's solution, although at first I still got the error that Scott Weinstein reported. How you get past that is:

    EITHER first login to Gmail from the machine this will run on, using the account specified. (It is not necessary to add any Google sites to the Trusted Sites zone, even if Internet Explorer Enhanced Security Configuration is enabled.)

    OR, on your first attempt, you will get the error, and your Gmail account will get a notice about suspicious login, so follow their instructions to allow future logins from the machine this will run on.

提交回复
热议问题