Code Monkey home page Code Monkey logo

mailjet.net's People

Contributors

ashleymedway avatar dapug avatar emergentsushi avatar luminalpark avatar rallman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mailjet.net's Issues

Adding/editing a custom contact parameter does nothing

When I create a new contact or update an existing one, custom parameters (already defined in Mailjet) seem to be ignored.

var props = new Dictionary<string,string>();
props.Add("x", "9");
var contact = new MailJet.Client.Request.Contact { Email = email, Name = "testName", Action = CreateContactAction.addforce, Properties = props };
Response<ContactData> resp= client.CreateContactForList(listId, contact);

Message attachement

Why attacjement are only sent using SMTP and not with API ..?

With the same message,
using SMTP
System.Net.Mail.SmtpClient serv = new System.Net.Mail.SmtpClient("in-v3.mailjet.com"); serv.Credentials = new System.Net.NetworkCredential("xxx", "xxx"); serv.Send(mess);
The message has attachements

And using API
MailJet.Client.MailJetClient client = new MailJet.Client.MailJetClient("xxx", "xxx"); client.SendMessage(mess)
The email has no attachements ..?

Send via Template

Are you planning to support sending by template with vars, etc?

http://dev.mailjet.com/guides/?shell#transactional-templating

My perception might be skewed because of previous Mandrill experience, but I thought the whole value of MailJet was the ability to send Templated transactional emails. This way the HTML is structured by MailJet and compatible with most clients. I didn't see a way to do this in this library. Did I miss something obvious?

MailJet.NET failing with RestSharp 105.2.3.0

Just letting you know, HttpBasicAuthenticator has been moved around to a different namespace, so MailJet.NET fails when using RestSharp 105.2.3.0

Exception thrown: 'System.TypeLoadException' in MailJetClient.dll ("Could not load type 'RestSharp.HttpBasicAuthenticator' from assembly 'RestSharp, Version=105.2.3.0, Culture=neutral, PublicKeyToken=null'.")

PS - good job on this project, saved me a bunch of time :)

Can't sent mail with empty body

MailJetClient.SendMessage(MailMessage) method fails with "Object reference not set to an instance of an object" if MailMessage.body is empty.

Statistics API aggregate parameter

Hello,
It seem to be impossible to use statistic api without method about campaign management. Particularly method on campaignaggregate (https://dev.mailjet.com/email-api/v3/campaignaggregate/).
From my actual perspective, you have to create a campaignaggregate, include some campaign inside and request statistics with CampaignAggregateID (https://dev.mailjet.com/email-api/v3/aggregategraphstatistics/). When I use method GetAggregateGraphStatistics who call method aggregategraphstatistics without any parameter, I have no result. When I pass CampaingID, I have no result neither.

Message sent twice

Hi!
First of all, thanks for the library!

I am trying to send a message using the sample code:

MailJetClient client = new MailJetClient("{PublicKey}", "{PrivateKey}");
client.SendMessage(new System.Net.Mail.MailMessage("[email protected]", "[email protected]", "subject", "email body"));

For some reason, it makes 2 requests on mailjet and I receive the email twice in my inbox:
screen shot 2016-04-19 at 18 37 12

What am I missing? Did anyone have such problems?

Thanks!

MesssageID, ContactID from Mailjet are not found in Response returned

Hello

Mailjet provides ContactID / MessageID while adding contacts/sending mails.
When I invoke CreateContactForList / SendTemplateMessage [MailJetCLient.cs] the Response object does not contain the ContactID / MessageID.

var data = JsonConvert.DeserializeObject<Response>(result.Content);

Thanks

SendMessage is not throwing http errors

When network issues occur, e.g. no network connection, the low level error code is not returned.
This could be the solution:

    private SentMessageData SendMessage(RestRequest request)
    {
        request.RequestFormat = DataFormat.Json;
        request.JsonSerializer = NewtonsoftJsonSerializer.Default;

        var result = WebClient.Execute(request);

        if (result.ResponseStatus == ResponseStatus.Completed && (result.StatusCode == HttpStatusCode.NoContent))
            return null;

        if (result.ResponseStatus == ResponseStatus.Completed && result.StatusCode == HttpStatusCode.Unauthorized)
            throw new UnauthorizedAccessException("MailJet returned an HTTP 401 exception, please check your credentials");

        if (result.ResponseStatus == ResponseStatus.Completed && result.StatusCode >= HttpStatusCode.BadRequest)
            throw new HttpException((int)result.StatusCode, result.StatusCode.ToString());

        if (result.ErrorMessage != null && String.IsNullOrWhiteSpace(result.Content))
        {
            throw new Exception(result.ErrorMessage);
        }
        else
        {
            var error = JsonConvert.DeserializeObject<ErrorResponse>(result.Content);
            if (!String.IsNullOrWhiteSpace(error.ErrorInfo) || !String.IsNullOrWhiteSpace(error.ErrorMessage))
                throw new Exception(String.Format("{0}\n{1}", error.ErrorMessage, error.ErrorMessage));
        }

        var data = JsonConvert.DeserializeObject<SentMessageData>(result.Content);
        return data;
    }

License restrictions?

Hey, we would like to use the library in a commercial application and are now looking into the licensing aspect of it. Actually you make the source code available for free on GitHub, but you didn't specify under which license the code can be used? Is it Apache License, MIT, GPL, ... ?

Could you pls. clarify this.

Thx.

GetContactData(id) is returning a null object

If you run client.GetContactData(), you get back an empty object, email and other properties are null, CreatedAt date is minvalue (sure shouldn't be). I tried this with a known-good contact, correct ID, has email and other properties populated in MailJet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.