Simple class library to send email and validate email addresses using Mailgun.
$ dotnet add package SendWithMailgunSendWithMailgun is a really small class library with only one goal in mind: sending an email with Mailgun. That's it. Need other features? Not here, sorry :(
First things first - do you need help or have feedback? File an issue! Happy to help.
using SendWithMailgun;
MailgunSender sender = new MailgunSender("[mydomain.com]", "[apikey]");
sender.Logger = Console.WriteLine; // if you want log messages
string id = null;
id = sender.Send("to", "from", "subject", "body"); // text
id = sender.Send("to", "from", "subject", "html", true); // html
Console.WriteLine("Message ID: " + id);
using SendWithMailgun;
MailgunValidator validator = new MailgunValidator("[apikey]");
MailgunValidationResult result = validator.Validate("[emailaddress]");
Console.WriteLine("Result: " + result.Result.ToString() + " risk level: " + result.Risk.ToString());