![]() Return Convert.ToBase64String(inputBytes) Private static string Base64UrlEncode(string input) NewMsg.Raw = Program.Base64UrlEncode(plainText.ToString()) "Content-Type: text/html charset=us-ascii\r\n\r\n" + Var service = new GmailService(new BaseClientService.Initializer() ![]() New FileDataStore(credPath, true)).Result Ĭonsole.WriteLine("Credential file saved to: " + credPath) GoogleClientSecrets.FromStream(stream).Secrets, New FileStream("credentials.json", FileMode.Open,Ĭredential = GoogleWebAuthorizationBroker.AuthorizeAsync( Static string ApplicationName = "Gmail API" I have tried reading through google's documentation as well as looking at what others have done and none of it really seems correct for what I'm trying to do? Below you'll see the code I have already got that is working to send an email based on what I write in plaintext. So long story short I want to get and forward emails to another gmail account (for now) and need some help figuring out how using the gmail api and c#. Google's documentation isn't the most helpful since I'm coding in C# and they don't have a lot of info when it comes to that. I have gotten the program working well enough to send plain text that I have typed into the code itself, but am unsure really where to begin with retrieving and forwarding emails that are incoming to my mailbox. ![]() ![]() I am trying to create a program that whenever a certain email receives mail it will automatically forward it on to another person (a whatsapp account to be specific but I'm not to that stage in the program yet.) I am currently just working with the gmail api mostly because the email that will be the one receiving mail is a gmail account. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |