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

3

I am developing for Windows embedded 6.0 and since I want to send emails, researching I found Mailgun this gives me the code which should be in 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 do you reference which libraries or dll should be used and therefore for that reason I get errors on the following sides, and the fragments ParameterType and Method does not exist in the context current and with RestClient , HttpBasicAuthenticator and RestRequest this if I throw the error

  

Unable to find type or name of namespace "" (missing a using directive or assembly reference)

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

    
asked by Cristian R.M 26.09.2016 в 18:22
source

2 answers

2

I think the dependency you use is RestSharp

Installation via nuget would be

PM > Install-Package RestSharp

Although I'm not sure if you have assembled for the platform you want to point to, 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 dll of your page in github

    
answered by 26.09.2016 / 18:26
source
0

If it is still useful to add the references you are looking for from the Visual Studio package manager, in my case it is the version of 2017 that has the name RestSharpSigned or download it from the page:

link

    
answered by 26.07.2018 в 23:53