Skip to content

martydill/mandrill-inbound-classes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

mandrill-inbound-classes

This is the set of classes that Surveylitics (http://surveylitics.com) uses to handle inbound emails with Mandrill (http://mandrillapp.com).

They are designed to be used with Json.NET, like this:

public ActionResult HandleMandrillWebhook(FormCollection fc)
{
	string json = fc["mandrill_events"];

	var events = JsonConvert.DeserializeObject<IEnumerable<Mandrill.MailEvent>>(json);
	foreach (var mailEvent in events)
	{
		var message = mailEvent.Msg;
		// ... Do stuff with email message here...
	}
	
	// MUST do this or Mandrill will not accept your webhook!
    return new HttpStatusCodeResult((int)HttpStatusCode.OK);
}

About

A set of C# classes for use with Mandrill's inbound webhooks and Json.NET

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages