Aki,

Thank you very much for the detailed information.

Do you know if it also allows for placing an attachment inside that message?

Thanks again,

Oren



Sent from Samsung Galaxy smartphone.


-------- Original message --------
From: Aki Tuomi <aki.tuomi@open-xchange.com>
Date: 11/4/20 1:38 AM (GMT-05:00)
To: Oren Yehezkely <orenyny@gmail.com>, dovecot@dovecot.org
Subject: Re: API support for placing a message for a specific user


> On 03/11/2020 02:24 Oren Yehezkely <orenyny@gmail.com> wrote:
>
>
> Hello,
>
> I am trying to find out if Dovecot API allows placing a message directly in a customer's mailbox, without needing to send the email via SMTP.
>
> Thanks for your help,
>
> Oren

`doveadm save` is available from HTTP API, but seems to be missing from documentation.

Example:

curl --user doveadm:password http://localhost:1122/doveadm/v1 -d '[["save",{"user":"testuser","file":"Hello, world"},"c0d0"]]'

note that despite being called 'file', is it actually the mail contents.

Aki

API for the SAVE command:

{
  "command": "save",
  "parameters": [
    {
      "name": "allUsers",
      "type": "boolean"
    },
    {
      "name": "socketPath",
      "type": "string"
    },
    {
      "name": "user",
      "type": "string"
    },
    {
      "name": "transFlags",
      "type": "integer"
    },
    {
      "name": "userFile",
      "type": "string"
    },
    {
      "name": "mailbox",
      "type": "string"
    },
    {
      "name": "file",
      "type": "string"
    }
  ]
}