What is the assembly reference for " RestClient, RestRequest and HttpBasicAuthenticator "

I am developing for Windows embedded 6.0 and then I want to send emails, investigating I found Mailgun this one throws me the code which must go into project which is this:

 public static RestResponse SendSimpleMessage()
    {
        RestClient client = new RestClient();
        client.BaseUrl = "https://api.mailgun.net/v3";
        client.Authenticator = new HttpBasicAuthenticator("api","key-2d624aae9621461bbaac333f01207b7a");
        RestRequest request = new RestRequest();
        request.AddParameter("domain","sandboxABCEDFGGHJKLOASDFDGDFGUI3456U5.mailgun.org", ParameterType.UrlSegment);
        request.Resource = "{domain}/messages";
        request.AddParameter("from", "Mailgun Sandbox <[email protected]>");
        request.AddParameter("to", "Cristian <[email protected]>");
        request.AddParameter("subject", "Hello Cristian");
        request.AddParameter("text", "Congratulations Cristian, you just sent an email with Mailgun!  You are truly awesome!  You can see a record of this email in your logs: https://mailgun.com/cp/log .  You can send up to 300 emails/day from this sandbox server.  Next, you should add your own domain so you can send 10,000 emails/month for free.");
        request.Method = Method.POST;
        return client.Execute(request);
    }

The problem is that nowhere refers to which are the libraries or DLLs to be used and for that reason it throws me errors on the following sides, and the fragments ParameterType and Method does not exist in the current context and with the RestClient, HttpBasicAuthenticator and RestRequest this if you throw me the error

Cannot find namespace type or name "" (missing a using directive or assembly reference)

I have been researching and therefore without any luck, and I would also like to know your suggestions on how to send emails by Windows embedded 6.0

 3
Author: Levi Arista, 2016-09-26

2 answers

I think the dependency you use is RestSharp

Installation via serial NuGet

PM > Install-Package RestSharp

Although I'm not sure if it has assembled for the platform you want to aim at, but the easiest thing is to try to install it and see.


If you are going to use Visual Studio 2008 we can save the "workarounds" and directly download the DLLs of your page in GitHub

 2
Author: jasilva, 2017-08-27 14:51:20

Try changing the line that says

client.Authenticator = new HttpBasicAuthenticator("api", "key-2d624aae9621461bbaac333f01207b7a");

By

client.Authenticator = new RestSharp.Authenticators.HttpBasicAuthenticator("api", "key-2d624aae9621461bbaac333f01207b7a");
 0
Author: Fernando Soto, 2019-12-02 22:37:31