• 大小: 0.50M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-25
  • 语言: C#
  • 标签: 邮件  C#  SendGrid  

资源简介

C# 发邮件源码(SendGrid)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Mail;
using SendGrid;

namespace Example
{
internal class Program
{
// this code is used for the SMTPAPI examples
private static void Main()
{
// Create the email object first then add the properties.
var myMessage = new SendGridMessage();
myMessage.AddTo(“anna@example.com“);
myMessage.From = new MailAddress(“john@example.com“ “John Smith“);
myMessage.Subject = “Testing the SendGrid Library“;
myMessage.Text = “Hello World! %tag%“;

var subs = new List { “私は%type%ラーメンが大好き“ };
myMessage.AddSubstitution(“%tag%“subs);
myMessage.AddSection(“%type%“ “とんこつ“);

    SendAsync(myMessage);

Console.ReadLine();
}

        private static a

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\
     文件         452  2015-04-27 15:20  sendgrid-csharp-master\.gitignore
     文件         869  2015-04-27 15:20  sendgrid-csharp-master\.travis.yml
     文件        1784  2015-04-27 15:20  sendgrid-csharp-master\CHANGELOG.md
     文件        1075  2015-04-27 15:20  sendgrid-csharp-master\MIT.LICENSE
     文件        6916  2015-04-27 15:20  sendgrid-csharp-master\README.md
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\.ci\
     文件         248  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\.ci\tests.sh
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\.nuget\
     文件     1662976  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\.nuget\NuGet.exe
     文件        7617  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\.nuget\NuGet.targets
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\Example\
     文件        3483  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\Example\Example.csproj
     文件        1463  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\Example\Program.cs
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\Example\Properties\
     文件        1388  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\Example\Properties\AssemblyInfo.cs
     文件       15817  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\Example\WEBAPI.cs
     文件         967  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\Example\app.config
     文件         143  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\Example\packages.config
     文件        5494  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGrid.sln
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\Exceptions\
     文件         499  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\Exceptions\InvalidApiRequestException.cs
     文件       11143  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\ISendGrid.cs
     文件        6472  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\Mail.csproj
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\Properties\
     文件        2196  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\Properties\AssemblyInfo.cs
     文件       14561  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\SendGrid.cs
     文件        1324  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\StreamedFileBody.cs
     目录           0  2015-04-27 15:20  sendgrid-csharp-master\SendGrid\SendGridMail\Transport\
............此处省略21个文件信息

评论

共有 条评论