Can't compile MailJet sample program (c#)

75 views Asked by At

I am trying to use MailJet to send a test email.

I have created a new project and use sample code provided in this page https://dev.mailjet.com/email/guides/getting-started/ I have added nuget Mailjet.api (3.0.0)

Result : The sample code does not compile. CS0117 'MailjetClient' does not contain a definition for 'Version' Version property is used in this code :

MailjetClient client = new MailjetClient(API_KEY, SecretKey)
     {
         Version = ApiVersion.V3_1,
     };

Looks like I don't use the right nuget because class MailjetClient does not have the Version Property.

Expected : The sample code compiles.

Question : What do I do wrong?

Note : If I comment the line which sets Version, program compiles and run, but does not work. The error is as follow, even if I provide FromEmail (which is present in the sample code) StatusCode: 400 ErrorInfo: At least FromEmail or Sender must be provided

0

There are 0 answers