1. Visit https://www.google.com/settings/security/lesssecureapps and enable access for less secure apps for some time
2. Verify that your machine where powershell is available , latest version of .Net Framework is installed.
3. Verify that in powershell you have "Send-MailMessage" available .
(in powershell window type :---- Get-Command Send-MailMessage )
4. Export your gmail/ any other email account contacts as csv . Say it has name of contact column as "name" and email as "email"
5. Create the sample html you want to send , say some dummy html
6. Here is a sample ps1 using "Send-MailMessage" with gmail
7. Give your sleep time in powershell script with respect to Gmail send message limits https://support.google.com/a/answer/166852?hl=en and https://support.google.com/a/answer/175121?hl=en
8. don't forget to disable less secure apps @ https://www.google.com/settings/security/lesssecureapps after you are done .
Post a Comment