# Mail ESI Question

**URL:** <https://forums.eveonline.com/t/mail-esi-question/14585>\
**Category:** Third Party Developers\
**Created:** [August 6, 2017, 3:14pm UTC](https://forums.eveonline.com/t/mail-esi-question/14585 "2017-08-06T15:14:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fecal\_Matters](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/fecal_matters/32/448952_2.png) [@Fecal\_Matters](https://forums.eveonline.com/u/Fecal_Matters)\
**Post date:** [August 6, 2017, 3:14pm UTC](https://forums.eveonline.com/t/mail-esi-question/14585/1 "2017-08-06T15:14:12Z")

</div>

Quick question!

Trying to use the /v1/characters/{character\_id}/mail/ endpoint to send my Alliance a mail. I am a member of a Corporation of the Alliance and have permissions in game to send Alliance wide eve mails.

I am setting recipient\_id to the Alliance ID, and the recipient\_type to “alliance”. Upon submitting to the endpoint I get a response of 500 Internal Server Error. I can send to characters just fine so I know the endpoint and code is functional.

Has anyone had any luck with this?

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [August 6, 2017, 4:32pm UTC](https://forums.eveonline.com/t/mail-esi-question/14585/2 "2017-08-06T16:32:48Z")

</div>

I just tried it out, and it worked fine.

POST Body:

```auto
{
  "approved_cost": 0,
  "body": "testing ESI endpoint, disregard",
  "recipients": [
    {
      "recipient_id": 99002208,
      "recipient_type": "alliance"
    }
  ],
  "subject": "Test mail please ignore"
}

```

URL: `https://esi.tech.ccp.is/v1/characters/96377439/mail/`

If you can continue to reproduce this issue create an issue here:

> **[ccpgames/esi-issues](https://github.com/ccpgames/esi-issues/issues)**
>
> esi-issues - Issue tracking and feature requests for ESI

EDIT: I see you already did, nice 🙂

---

<div class="post-metadata">

**Author:** ![Fecal\_Matters](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/fecal_matters/32/448952_2.png) [@Fecal\_Matters](https://forums.eveonline.com/u/Fecal_Matters)\
**Post date:** [August 6, 2017, 5:04pm UTC](https://forums.eveonline.com/t/mail-esi-question/14585/3 "2017-08-06T17:04:36Z")

</div>

Interesting, are you a normal corp member with privileges to send mail tot he alliance, or a director of corp/alliance?

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [August 6, 2017, 5:46pm UTC](https://forums.eveonline.com/t/mail-esi-question/14585/4 "2017-08-06T17:46:13Z")

</div>

The character I tried it with only has `Rent Office` station service role and view/take access to one hanger.

---

<div class="post-metadata">

**Author:** ![Fecal\_Matters](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/fecal_matters/32/448952_2.png) [@Fecal\_Matters](https://forums.eveonline.com/u/Fecal_Matters)\
**Post date:** [August 6, 2017, 8:22pm UTC](https://forums.eveonline.com/t/mail-esi-question/14585/5 "2017-08-06T20:22:02Z")

</div>

Thanks so much for the help Blacksmoke! I’ll see if I can figure out what I either am doing wrong or have set improperly!

And just to prove I’m not bonkers 😉 Here is the JSON I’m sending

`{ "approved_cost": 0, "body": "test body", "recipients": [{ "recipient_id": 99005688, "recipient_type": "alliance" }], "subject": "test subject" }`

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [August 6, 2017, 8:26pm UTC](https://forums.eveonline.com/t/mail-esi-question/14585/6 "2017-08-06T20:26:09Z")

</div>

Yea good luck mate, that JSON looks ok so not quite sure.

Might be due to something with the roles of the character or something? Have to see what CCP says on your bug report.
