Open KaKi87 opened 2 years ago
You can think if different solution. First, yoy can startnit by calling node ahem.js. Get the pid and kill as needed. You couls also use something like pm2 to start and stop it with a command. I am sure there are other ways.
On Tue, Mar 22, 2022, 21:02 KaKi87 @.***> wrote:
Hello,
Is there, or could there be, a programmatic API, for this server, so that it can be dynamically used by a parent script to start, receive and stop ?
Thanks
— Reply to this email directly, view it on GitHub https://github.com/o4oren/Ad-Hoc-Email-Server/issues/69, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFTF65VSTY7LENUEVOHGGW3VBIKMTANCNFSM5RLY7XWQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
That could work for starting and stopping, but what about receiving ?
Hi, not sure what you mean exactly by receiving, but I added a webhook parameter to the environment variables which was merged into the project and works well for me.
Anytime an email arrives, Ahem hits the webhook with the email contents so you can react accordingly.
On Wed, 23 Mar 2022, 13:46 KaKi87, @.***> wrote:
That could work for starting and stopping, but what about receiving ?
— Reply to this email directly, view it on GitHub https://github.com/o4oren/Ad-Hoc-Email-Server/issues/69#issuecomment-1076335461, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH6GZLPDWH6ZNQBAI4K673VBMHCHANCNFSM5RLY7XWQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
So, to programmatically receive emails, I must create a local HTTP server ?
This seems very dirty.
Here's the merge for the dirty solution. https://github.com/o4oren/Ad-Hoc-Email-Server/pull/36
Some of us are trying to take Ahem places the author never planned, but he seems open to accepting merge requests.
When up, ahem server exposes a restful api. You can just pick it up in the debug console when using the ui. Thanks
On Wed, Mar 23, 2022, 14:46 KaKi87 @.***> wrote:
That could work for starting and stopping, but what about receiving ?
— Reply to this email directly, view it on GitHub https://github.com/o4oren/Ad-Hoc-Email-Server/issues/69#issuecomment-1076335461, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFTF65RPNWTTMGKDBK4XZU3VBMHCFANCNFSM5RLY7XWQ . You are receiving this because you commented.Message ID: @.***>
Hello,
Is there, or could there be, a programmatic API, for this server, so that it can be dynamically used by a parent script to start, receive and stop ?
Thanks