API to send email

Hi,

is there on the roadmap the possibility to send email via API? As a developer it will be great to use Mailinabox to also send email programmatically via API…

Cheers,

F

There is already an API for email - smtp. Another would be redundant! Most scripting languages have a library (python has smtplib) for sending mail, and there are plenty of command line apps that do it.

1 Like

Hi, thanks for reply. Would you mind pointing me to that API for sending email?

I have been looking here: Mail-in-a-Box HTTP API but maybe I am missing something.

Thanks,

F

Hi @Dudiello - a quick google search following @andrew’s advice gives you the answer you are seeking.

Pick your programming language, find an SMTP library you can import then you have an API to send email from any SMTP server - there is nothing special here about MIAB.

Thanks for the info, however that was not what I was looking for.

My question was if (and when) then NATIVE mailinabox API will support sending an email. Easy as that, with no workaround and other stuff…

Sorry for my English and thanks for understanding,

CHeers,

F

There are no plans to add a new mail-sending API to Mail-in-a-Box.

thanks Josh for the clear statement.

Out of curiosity, what is driving this choice?

Thank you,

F

Because there already are what is properly the two most well documented APIs in existins SMTP and ESMTP. They are native to mail servers and all mail servers implement them. Why would you add another. What would you gain?

2 Likes

Hi Dudiello. There might be some confusion here. MIAB is not a single product/package. It is a collection of install, configuration & management scripts that control a collection of standard packages. Together these standard packages provide email, webmail, and so on (postfix, dovecot, roundcube, etc)

These standard packages already provide the standard mechanisms (smtp, pop, imap, etc) for sending and receiving email, and for accessing mailboxes.

It’s normal to access mail using these standard mechanisms. You’ll find all systems you want to install use (or provide) these standard mechanisms. Your language of choice will provide access to these email services.

The other replies are right — though a touch hostile. I think we can tone things down a bit in this thread.

But I’ll add that the reason for almost everything here is that I don’t have time to build, maintain, or manage anything that isn’t essential (and I don’t really have time for what’s essential either!). If we can keep Mail-in-a-Box being good at what it does, then I see that as a success.

1 Like

Thanks Josh for the kind reply and soft approach.

I have other questions on the topic but it seems like it is not easy to raise them in this thread.

Thanks again for the great product,

F

1 Like

@Dudiello, I’m curious what features you would want to see in a hypothetical mail sending API that would differentiate it from SMTP/ESMTP?

What is it you are hoping to do that you can’t do with the existing tools?

Thanks Nugget,

maybe I am missing something in all of this, everyone was so sure about their answers, and as I am not a real techie, probably the issue is on my side.

To try to answer your question, Imagine you are using a platform (eg Bubble.io) to build your WebApps and you can only call API to send email (no possibility to install libraries, use Python etc, only call some APIs): what API shall I call in my Mailinabox to actually send email?

As people are saying this request is a duplicate, maybe then is Postfix is exposing APIs on MBox and I just have to use them?

Again, nothing can be installed both at client side and, of course, on Mbox side…just pure API to API communication.

Thanks again for listening,

Have a great day,

F

Looks like someone has already solved this for Bubble New: SMTP Plugin - Plugins - Bubble Forum

I know very little about Bubble but this came up while searching.

Edit: Also I think there might be some differences in terminology, I think you are after a Web based / RESTful / REST-like API similar to send grid, whereas an API could be more general including things like SMTP, though a service like Bubble might not directly support it.

Thanks, yes, I saw that plugin, I was just wondering if I can do it natively without paying an extra fee.

And correct, I was looking for RESTful API on MBox.

F

I did a search on Github and this project looks recentish and has some documentation. Plus it looks like it was created with similar intentions as to what you need.

To keep your Mail in a Box pure and easy to maintain, I would look at spinning this up in a separate instance or container.

Hope this helps or is the start of a new path of investigation.

Edit: spelling

1 Like

This topic was automatically closed after 61 days. New replies are no longer allowed.