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