public MailgunHttpRequest(IMailgunAccountInfo accountInfo, string method, string relativePath) { request = WebRequest.Create(new Uri(accountInfo.DomainBaseUrl, relativePath)) as HttpWebRequest; request.Method = method; // Note: ensure no preceding 401, request.PreAuthenticate does not work as you might expect request.Headers.Add("Authorization", "basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(String.Format("api:{0}", accountInfo.ApiKey)))); }
public CreateRouteCommand(IMailgunAccountInfo accountInfo, int priority, string description, RouteFilter expression, params RouteAction[] actions) : base(accountInfo, "../routes") { this.priority = priority; this.description = description; this.expression = expression; this.actions = actions; }
public MailgunHttpRequest(IMailgunAccountInfo accountInfo, string method, string relativePath, int timeout = 100000) { request = (HttpWebRequest)WebRequest.Create(new Uri(accountInfo.DomainBaseUrl, relativePath)); request.Method = method; request.Timeout = timeout; // Note: ensure no preceding 401, request.PreAuthenticate does not work as you might expect request.Headers.Add("Authorization", "basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes($"api:{accountInfo.ApiKey}"))); }
public SendMailCommand(IMailgunAccountInfo accountInfo, MailMessage mailMessage) : base(accountInfo, "messages") { this.mailMessage = mailMessage; }
public DeleteCommand(IMailgunAccountInfo accountInfo, string path) : base(accountInfo, path, "DELETE") { }
protected MailgunCommand(IMailgunAccountInfo accountInfo, string path, string httpVerb = "POST") : base(accountInfo, path, httpVerb) { }
public MailgunRouteQuery(IMailgunAccountInfo accountInfo) : base(accountInfo, "../routes") { }
protected MailgunQuery(IMailgunAccountInfo accountInfo, string path) { this.path = path; AccountInfo = accountInfo; }
public MailgunStatsQuery(IMailgunAccountInfo accountInfo, MailgunEventTypes eventTypes) : base(accountInfo, "stats") { this.eventTypes = eventTypes; }
public CreateMailboxCommand(IMailgunAccountInfo accountInfo, string account, string password) : base(accountInfo, "mailboxes") { this.account = account; this.password = password; }
public SendMailCommand(IMailgunAccountInfo accountInfo, MailMessage mailMessage, IDictionary <string, IDictionary <string, object> > recipientVariables) : base(accountInfo, "messages") { this.mailMessage = mailMessage; _recipientVariables = recipientVariables; }
protected MailgunCommand(IMailgunAccountInfo accountInfo, string path, string httpVerb = "POST") { this.path = path; this.httpVerb = httpVerb; AccountInfo = accountInfo; }
public MailgunMailboxQuery(IMailgunAccountInfo accountInfo) : base(accountInfo, "mailboxes") { }