How To Set Up Your SMTP Server
Last updated on
Businesses with a digital presence need to send a large number of emails to their users, clients, vendors, etc. For this, you need an email service or email API service to deliver emails. Email services are hosted by large cloud service providers that offer a convenient way to send emails.
These email services have their own set of rules and guidelines for sending emails that are designed to prevent spamming from their email servers. This might not suit a business that has custom email requirements. For such requirements, you need to set up your own SMTP mail servers.
What Is an SMTP Server?
SMTP stands for Simple Mail Transfer Protocol, and it is the protocol used to send emails over the internet. Popular mail services like Gmail and Outlook use SMTP servers to deliver and receive emails.
Just as HTTP is used to deliver websites to users, SMTP is used to send emails and web servers that support SMTP are called SMTP servers. You need an SMTP server to deliver emails from your domain name, and when you use an email service, you are using the SMTP servers from the service provider according to their stipulations.
Requirements for an SMTP Server
There are some requirements you need to satisfy before you can set up SMTP servers. More specifically, you’ll need to have the following before setting up SMTP servers:
- A virtual private server (VPS)
- Domain name
You can set up SMTP servers on your personal PC, but for formal applications it’s always recommended to use a VPS. You can choose any of the VPS options from IaaS (Infrastructure as a Service) service providers according to your requirements, but make sure the email ports are not blocked first.
You also need to have a domain name from which you’ll be sending emails. For this example, we will be using the domain ‘postscript.email’. Similarly, to set up your SMTP server, you need to have a domain name. You can buy a new domain from any domain registrar. If you have an existing domain name for your website, you can use the same domain name for your SMTP server.
You’ll need to install SMTP software to support and run the SMTP server. There are two broad approaches you can take here.
Install a Dedicated SMTP Server
The first option is to install dedicated software that just handles the SMTP server. This software will have no other capability other than managing the SMTP server, but some software will have additional facilities like managing mailing lists, spam filters, etc. This will depend on the SMTP software you use. Similarly, there are paid, free, and open-source SMTP software you can use.
Some of the most popular SMTP servers are:
Each of the servers will have its own dedicated installation instructions, as well as guides on how to manage and maintain the SMTP servers.
Web Hosting Control Panel
According to Wikipedia, “A web hosting control panel is a web-based interface provided by a web hosting service that allows users to manage their servers and hosted services.” They install and manage all the nitty-gritties of managing web servers and only require minimal interaction. Such web hosting control panels have SMTP servers embedded in them, making this the easiest way to set up an SMTP server. Some of the most widely used web hosting control panels are:
Using any of the above control panels gives easy access to creating SMTP servers. To send and receive emails you just have to make sure that the VPS has not blocked the email ports.
Setting Up an SMTP Server with Plesk
Plesk is a popular web hosting control panel. Here, in this example, we are using a privately hosted Linux server with Plesk installed. The domain registrar used is namecheap and the domain ‘postscript.email’ is already purchased with the registrar.
First, you need to change the DNS records of the domain. For that, log in to the domain registrar and access the advanced DNS settings of the domain.
In namecheap, under ‘HOST RECORDS’ click the ‘Add new record’ button.
Choose ‘A Record’ as the record type, ‘@’ as Host, and the IP address of your server as the value. Click on the ‘Save all changes’ button to save the record. Once the DNS is resolved the domain name will point to the server whose IP address you gave.
Adding the Domain to Plesk
The next step is to add the domain name to Plesk. Login to the Plesk server dashboard and click on the ‘Add domain’ button.
Choose the appropriate way of creating your website in the following screen. If you just want to set up the SMTP server, you can go with the option ‘Blank website’. Enter the domain name, complete the other fields and click the ‘Add domain’ button.
Now the SMTP server is automatically created by Plesk for the domain.
Navigate to the webspace corresponding to your domain in the Plesk server and click on the tab titled ‘Mail’, then choose ‘Mail Accounts’.
Click on the ‘create email address’ button on the following page. Enter the details, password, and other settings. Click on the ‘OK’ button. You can also choose to use an auto generated password.
You can use the email address with the password to send and receive emails. In this example, the email created is ‘firstname.lastname@example.org’.
The conventional practice today is to use an email service to send emails from your domain name, but you have to adhere to the rules and regulations of the email service provider. One viable option, with more freedom, is to set up your own SMTP server with the appropriate software that suits your needs.
Email is just one of several ways to engage your users and send notifications about password changes, transactions, and other details. MagicBell’s complete notification system allows you to manage push, email, and in-app notifications from a single dashboard.
With MagicBell, you can launch a notification system in an hour, without breaking a sweat.