Score:0

Email Server with API calls

my flag

I am new to the world of Web Email and domain hosting. I was looking into projects like https://temp-mail.org/en/ and https://kopeechka.store. In these applications I can receive an email address, receive emails to those email addresses, and then delete the email from a simple python client using API calls to their API's. I want to replicate something similar using my own domain name(I have not registered one yet) and email server. I was looking into possible email hosting providers that have there own API but I have not found a cheap option. I am also open to creating my own email server using a vps but I do not know how I would turn a vps into a mail server on my own domain name and be able to make api calls from a simple python or JavaScript client that could create a new email address, receive emails from that address and delete the email address and mailbox.

Some examples of these API calls being made in python using requests might look like

Create a new address

import requests
import json
url = "https://api.Mydomain.com/email/addresses/Create-new-email"
payload = {
    'Login': "New-address-username"
    'Password': "New-address-password"
}

headers = {
    'authorization': "Example-API-KEY",
    'content-type': "application/json"
}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

Program would print

Created Address [email protected]

A similar method of API calls could be used to list all the emails the address has received and retrieve the contents of a specific email, as well as delete an address and all the associated directory's and emails.

Any information on how I could go about this will be appreciated.

djdomi avatar
za flag
try mailcow it has api abilities. and waa writing for easier management. Remember that it is a full mail server with web interface
Xsnipe 1231 avatar
my flag
@djdomi I looked at mailcow and it looks good I just can find the API call for getting the contents of an email sent to one of the mailboxes
djdomi avatar
za flag
mailcow has also a telegram group where you can get support if needed, the devel is also inside the channel
Score:1
cm flag

Go the standard route.

  1. Set up a SMTP server for receiving mail
  2. Set up an IMAP server for storing mail
  3. Use an IMAP access library for a programming language of your choice to manipulate the mail store

For every point there a dozens of how-tos on the internet. And even better: for every point there are multiple exchangeable options. Because these are standards.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.