Creating a Message for Gmail API in C#
问题 I'm looking at using the Gmail API in an application I'm working on. However, I'm not sure how to change their Java or Python examples over to C#. How exactly does the existing sample change over? Sample found here. 回答1: Here is what I was able to get working, using MimeKit. public void SendEmail(MyInternalSystemEmailMessage email) { var mailMessage = new System.Net.Mail.MailMessage(); mailMessage.From = new System.Net.Mail.MailAddress(email.FromAddress); mailMessage.To.Add(email.ToRecipients