标签:console world pkg string fill direct data- csharp portal
using System; using System.Net.Mail; using SendGrid; namespace SendGridAzureSample { class Program { static void Main(string[] args) { SendGridMessage myMessage = new SendGridMessage(); myMessage.AddTo("send_to"); myMessage.From = new MailAddress("from_email", "Display name"); myMessage.Subject = "Testing the SendGrid Library"; myMessage.Text = "Hello World!"; //myMessage.AddAttachment(@"attachment_path"); var key = "your_key"; // create a Web transport, using API Key var transportWeb = new Web(key); transportWeb.DeliverAsync(myMessage); Console.ReadKey(); } } }
reference link : https://azure.microsoft.com/en-us/documentation/articles/sendgrid-dotnet-how-to-send-email/
标签:console world pkg string fill direct data- csharp portal
原文地址:http://www.cnblogs.com/gccbuaa/p/7215928.html