Example #1
0
        static void Main(string[] args)
        {
            var bytes      = File.ReadAllBytes("credentials2.json");
            var baseString = Convert.ToBase64String(bytes);

            GmailApi.GmailHelper gh = new GmailApi.GmailHelper(baseString);

            gh.Send(new string[] { "*****@*****.**" }, "Api Test", "My Body");

            Console.Read();
        }
Example #2
0
 public static bool SendMassGmail(string[] emails, string body = "", string subject = "")
 {
     try
     {
         GmailApi.GmailHelper gh = new GmailApi.GmailHelper(GmailApi.GmailHelper.Credential64);
         gh.Send(emails, subject, body);
         gh.Dispose();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }