-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
72 lines (55 loc) · 1.62 KB
/
README
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Mailgun API wrapper for C#
Documentation:
=============
* Online docs
Please visit our documentation page at
http://documentation.mailgun.net
Installation:
=============
* Make sure you have nant installed
* build Mailgun.dll
> cd mailgun.cs
> nant
> ls
Mailgun.dll
Samples tryout:
===================
> nant run_sample -D:sample=MailboxSample
> nant run_sample -D:sample=RouteSample
> nant run_sample -D:sample=SendingSample
Running on Mono:
================
After the initial Mono installation you’ll have no trusted roots certificates pre-installed.
In case if accessing mailgun via SSH you need to issue the following command:
> mozroots --import --sync
Otherwise, you'll get the following error when connecting via SSH:
Error getting response stream (Write: The authentication or decryption has failed.): SendFailure
Getting started:
================
using System;
using System.Collections.Generic;
using MailgunClient;
using System.Text;
namespace MailgunSamples
{
public class MailboxSample
{
public static void Main ()
{
Mailgun.Init("key-afy6amxoo2fnj$u@mc");
try {
//List all mailboxes
List<Mailbox> list = Mailbox.Find ();
Console.WriteLine ("Mailboxes:\n");
foreach (Mailbox m in list)
Console.WriteLine ("{0}@{1} {2}", m.User, m.Domain, m.Size);
} catch (MailgunException ex) {
Console.WriteLine (ex.StackTrace);
Console.WriteLine (ex.Message);
}
}
}
}
For more visit http://documentation.mailgun.net
--
MG team