postal
postal copied to clipboard
Bulk sending messages in single API call
It would be good to send multiple messages to the API in a single HTTP request. The current send/message
and send/raw
methods are designed for sending a single method.
A new method (or methods) will be needed for this purpose.
In theory, the API should simply accept an array of hashes containing the params that would normally be passed to the send/message
or send/raw
methods. It should then go through this array and compile a result hash that is the same format of that in the single messages above.
Could the code I submitted be used as basis, removing the to
parameter, and give it a different API endpoint?
In my opinion it should be possible to define global parameters (e.g. subject, from, html body), which can be appended/overwritten with per-recipient parameters.