Quantcast
Channel: SharePoint
Viewing all articles
Browse latest Browse all 103

Send bulk email using gmail or any other server

$
0
0

 

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 http://sharepoint.asia/sendemail/somehtml.html

6. Here is a sample ps1 using  “Send-MailMessage” with gmail

http://sharepoint.asia/sendemail/sendgmail.ps1

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 .

 

 

 

 


Viewing all articles
Browse latest Browse all 103

Trending Articles