My environment is rocky linux 9, and I’m using docker for the first time to set up mailcow.
I’ve successfully setup mailcow, and I’ve been able to send and receive mails using webmail interface.

I have read the api file of mailcow.
mailcow.docs.apiary.io Icon mailcow API · Apiary

#
But I don’t see any api for sendmail.
Is there any way for me to send emails via api?
Or can I use a command to sendmail?

Why not using IMAP?

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

I need to send mail from the server, and I was going to write a program to automatically send a validation code like mail to users via postfix.
But now that docker’s postfix is using port 25, I can’t operate docker’s postfix directly, so I’m looking for support in the api file.

pkernstock
I don’t know if I’m understanding this article correctly.
Using this approach seems to complicate the situation
Because I will still have a need to use webmail to send and receive mail.
Stopping docker’s postfix would prevent mailcow from sending mail.

The dumbest solution I can think of right now is to start another server and use postfix to do this.
But ……. I’ve always found this to be very redundant.

you can send the emails via SMTP pretty much the same way you’d be sending them via API (if not easier).
Whatever language you are using I’m pretty sure you would have a decent selection to both send and read emails.
You sure you’re not over complicating things? 🙂

    maddler
    Looks like I’m really complicating things, I always thought you had to use an api to use mailcow to send mail.
    Using smtp did solve my current problem, but getting spammed by gmail is another thing I’ve learned!😅
    Thank you very much.

    Glad you saw the light! 😃

    No one is typing