mailjet/mailjet-apiv3-java

Send Mail With JDK11 HttpClient?

amihaiemil opened this issue · 1 comments

Hello,

I've been trying to send a mail via MailJet's 3.1 Send API using plain JDK11 HttpClient.
I make a POST with the JSON from the documentation, using Basic authentication.

I receive 200 OK, but the mails are not actually being sent.

The same authentication keys I have used for making cURL calls and the mails send with cURL seem to work fine.
Is there something I am missing out? Are you doing anything special in your Java client?

Thank you,

Nevermind, I found the problem: I was using a sender address which was not verified. Request reaches the MailJet server, but the sender address stays in "Pending" until I manually send a confirmation mail to it. After confirmation, everything works.