blob: 3bbc1dbabd791cfdb16075bbf7eac1ae23993fb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Text;
using SendGridMail;
using SendGridMail.Transport;
namespace Example
{
class Program
{
static void Main(string[] args)
{
var username = "cjbuchmann";
var password = "Gadget_15";
var from = "cj.buchmann@sendgrid.com";
var to = new List<String>
{
"cj.buchmann@gmail.com"
};
//initialize the SMTPAPI example class
var smtpapi = new SMTPAPI(username, password, from, to);
//send a simple HTML encoded email.
//smtpapi.SimpleHTMLEmail();
//send a simple Plaintext email.
//smtpapi.SimplePlaintextEmail();
//send a gravatar enabled email.
smtpapi.EnableGravatarEmail();
}
}
}
|