1

I am trying to use Mailjet to send messages via email, but why is the word version not recognized in it? I downloaded the mailgate package

I'm practicing programming using the asp.net core5.0 framework.

Are there other distinct ways to send messages via e-mail?

Any advice from you?

using Mailjet.Client;
using Mailjet.Client.Resources; 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; 
using Microsoft.AspNetCore.Identity.UI.Services;
using Newtonsoft.Json.Linq; ][1]
Mattias
  • 3,907
  • 4
  • 28
  • 50
  • Have you installed the package? – Martheen Oct 19 '21 at 04:15
  • `why is the word version not recognized in it` can you explain this? Can you share the code which is having issue? What's the exact issue you are facing? – Chetan Oct 19 '21 at 04:27
  • Is the Mailjet package unrecognizable? What is the specific error, or you can provide the csproj file to see if it exists or is correct. – Tupac Oct 19 '21 at 06:51

1 Answers1

1

If you have Version = ApiVersion.V3_1, as part of your sample code, comment it out and add the appropriate BaseAdress line in the example below:

MailjetClient client = new MailjetClient("xxx-example-xxx", "xxx-example-xxx")
{
    BaseAdress = "https://api.mailjet.com",
    //BaseAdress = "https://api.us.mailjet.com",
    //Version = ApiVersion.V3_1,
};
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77