×
Community Blog How to Setup Domain Email in Web Hosting

How to Setup Domain Email in Web Hosting

Nowadays email is important for your website and business, in this article, you will learn how to use hMailServer and Thunderbird to setup the email service with your domain name for your web hosting.

Nowadays, how to setup a website is not such a big problem as before and web hosting has become important for a business. But how we can do to emails? When someone types www.my-new-venture.com into their browser they'll see your website. But if someone sends an email to sales@my-new-venture.com where will the message end up? By default, the answer is generally "nowhere at all". Incoming emails will bounce, which means that the sender will receive an error message saying that their message couldn't be delivered. Similarly, you won't be able to send email from your new domain either.

Until you set up your email, your business is not really fully online. Clearly this is a problem that you need to rectify. So how to setup a domain email for web hosting?

Alibaba Cloud provides a profound and reliant web hosting services for your website, and now just $2.50 a month makes you benefit from all advantages of SSD through the new packages, which not only offer you SSD cloud server but also including a data transfer plan that you must need for web hosting. Alibaba Cloud also provide services for enterprise emails. Come and Join Us!

Once you have setup a website, and web hosting is up and running, you really need to set up your email hosting too. This will let you send and receive email via your domain name. You can set up as many email accounts (also known as mailboxes) as you want. And you can set separate usernames and passwords for each one, so that different team members or employees can use their company email account without it being visible to anyone else.

One option is to setup with a commercial email hosting provider. However, this can prove expensive because you typically have to pay a monthly fee for each user's mailbox, and larger mailboxes (capable of holding more messages) are more expensive. But by setting up your own email server you can have as many mailboxes or email accounts as you want, and each can be as large as you wish, so long as your server has sufficient disk space.

Web hosting comprises three main components: a domain name, a web server to host the content, and a DNS entry that links the two together. The process starts when someone (anyone, anywhere in the world) types your website's address into their browser. The browser first makes a connection to the worldwide DNS database to look up the IP address of the web server associated with that domain name. Next, the browser makes a connection to that IP address and sends a command to the web server, asking for a specific page. The web server then sends the requested page to the browser and it's displayed on the screen.

Email hosting, in order to be able to receive incoming messages, works in a similar way. When someone sends an email message to john.smith@my-new-venture.com, their email program consults the DNS database to find out the IP address of the email server for my-new-venture.com (which may or not be the same as the web server for the same domain name). The email program then connects to the email server and sends the message, along with details of which of the server's users it is for (John Smith in this case). The email server stores the message. Later, when John wants to read his email, he uses his email program to log in to the email server using his allocated username and password. The server will then display all the incoming messages that have been received for him.

As you can see, the DNS system isn't just for linking domain names with web servers. It also creates the links for email servers, so that they can receive incoming mail for the domain. It works because there are multiple record types. The so-called "A" record (which stands for Address) is how you specify the address of a web server that corresponds to a domain name. Similarly, an "MX" record (which stands for Mail Exchange) specifies the address of the domain's mail server.

If you want your email hosting and web hosting on the same server, you simply set your domain's A record (specifically the A record for www.my-new-venture.com in this case) and MX record to the same IP address. If you want to host your email somewhere else, just change the MX record.

Email Hosting

In this tutorial, we will use free email server software called hMailServer for the email services and a free email program called Thunderbird to read our email. So with Windows server correctly provisioned, secured and named, let's install hMailServer.

  1. Log into the server, either via a browser or Remote Desktop, open a web browser, head to www.hmailserver.com and download the latest version. Then double-click to start the installation.
  2. Accept the default options as you progress through the installation screens. Choose to install both the server and the administration tools.
  3. Choose to use the built-in database for now. For a production environment you may prefer to use an external database engine that is already installed on the mail server or elsewhere. Alternatively, you could use Alibaba Cloud ApsaraDB RDS, but for the moment we will use the built-in database.
  4. When asked, create an administration password for hMailServer and make a careful note of it.
  5. When installation is finished, run hMailServer Administrator. The first time you do this you'll be asked which database to connect to. Choose the only one that is offered, select "automatically connect on startup", then click Connect.
  6. The mail server admin panel will appear.
  7. To start, click "Add domain". Enter my-new-venture.com(your domain you have registered) and click Save.
  8. On the left hand side of the screen, under the domain name, click on Accounts and then click Add.
  9. On the general tab, we'll create an email address called hello@my-new-venture.com and set its password to "p@ssw0rd". You can give your mailbox a quota if you wish, to avoid the user filling up the server's disk space by omitting to regularly clear out old messages.
  10. On the Advanced tab, set the user's first and last name. We'll choose John Smith. Then click Save.
  11. Open your normal email program or website, and send a message to hello@my-new-venture.com.
  12. Download the latest version of Thunderbird from www.thunderbird.net and double-click to begin installation, then run it. From the Settings menu, under Account Actions, click on Add Mail Account.
  13. Enter your name, email address (hello@my-new-venture.com) and mailbox password (p@ssw0rd in this case). Thunderbird correctly deduces that it needs to connect to mail.my-new-venture.com to retrieve email. Click on Done, then OK, to complete the setup process for your imcoming email service.
  14. Sign up for a SendGrid account and then configure the account settings into hMailServer so that it knows to use our account for sending outgoing mail.
  15. Clicking on the relevant option to start sending email via the SMTP relay.
  16. Choose the SMTP Relay option for the setup method.
  17. Enter a name for the key and click Create Key.
  18. You can now see the configuration settings that are required to send mail via SendGrid, all ready to type into hMailServer.
  19. Copy the API key (shown as Password) to the clipboard or another document file and keep it safe. For security reasons, SendGrid won't show it to you again. If you forget it, you can always create another one and update your hMailServer configuration accordingly.
  20. Log out of SendGrid's website and log in to your Windows server. Head to the hMailServer administration panel.
  21. Under Settings, choose Protocols and then SMTP. Click on the "Delivery of e-mail" tab.
  22. For the local host name, enter my-new-venture.com. Under SMTP Relayer, the remote host name in this instance is smtp.sendgrid.net, as given to us when we created the SendGrid account above.
  23. Set the remote TCP/IP port to 587. Although the default port number is 25, we are unable to use this as Alibaba Cloud prohibits outgoing connections on port 25 for security reasons. As we saw above, SendGrid accepts incoming connections to its SMTP service on port 587, and we previously opened port 587 in both the Windows firewall and the Alibaba Cloud security group in readiness for sending mail.
  24. Tick the "server requires authentication" box. As instructed by SendGrid, enter a username of apikey and enter the full API key as the password. Leave connection security set to None as we're not currently using an encryption certificate on our server.
  25. Click Save. Note that the SMTP configuration data is a one-off setting for your entire company (any email account ending in @my-new-venture.com in this instance). You don't need to create new outgoing settings for each new mailbox you create.

For details about Registering the Domain Name, Configuring an Instance, DNS Settings, Connecting to the Server, Configuring Server Security, please go to How to Set Up Email Hosting on Alibaba Cloud.

Related Documentation

Resolve a domain name to a Web Hosting instance

A domain name must be resolved to the address provided by Web Hosting. This helps you or your users to visit the website hosted on the Web Hosting instance by accessing the domain name. Once a Web Hosting instance is purchased, an address *.aliwebs.com is provided. You must add CNAME resolution to *.aliwebs.com.

Get started with Web Hosting

Web Hosting is equipped with built-in OS, databases, FTP sites and other services, which enable you to readily build a website. This article helps you familiar with the preparations and process on building a website.

Related Blog Posts

ICP Registration: Smoothing the Hurdles of Chinese Web Hosting

This whitepaper introduces and guides English-speaking business professionals and developers through the legal and technical steps to hosting a website or e-commerce platform in Mainland China.

5 Best Practices for Different Web Application Hosting Scenarios

Traditional web hosting usually follows a three-tier design that divides the architecture into presentation, application, and persistence layers. The design achieves scalability through the inclusion of additional servers at each of these layers. The architecture also has built-in high availability features. The section below examines the means of deploying this traditional web hosting in Alibaba Cloud.

When deploying a web application on Alibaba Cloud, you should consider making modifications in your deployment to fully utilize the advantages of the cloud. Below are some key considerations of when hosting an application on Alibaba Cloud.

Related Market Products

cPanel & WHM

cPanel & WHM is the world's premier web hosting automation software. With Version 82, you can now deploy Python WSGI applications. We also added new UAPI modules for Box Trapper, GPG, ImageManager, and ServerInformation.

Wordpress on LAMP Ubuntu 14.04 64bits powered by IGS

Integrated with one of the world’s most popular web publishing platforms for building blogs and websites. We, IGS, provide a list of images pre-integrated with most popular software for web solution. It includes ready-to-run versions of Apache/Nginx, MySQL, PHP, phpMyAdmin and all of the other software required to run each of those components. IGS image greatly simplifies the development and deployment of web applications.

Related Products

Web Hosting Solution

Alibaba Cloud provides web hosting solutions suitable for businesses of all sizes. We help you reduce development, maintenance, and IT costs while guaranteeing the security and stability of your site.

Enterprise Email

Alibaba Mail is one of the only email service providers in the industry that supports public cloud services and provides fast, secure, and stable services.

Related Whitepapers

Starting Out In Web Hosting: Alibaba Cloud For New Businesses

For anyone starting a new business, or attempting to modernize an existing one, having a presence on the Internet is vital. The web is where the majority of purchases begin, as today’s tech-savvy consumers search online for products. It’s changed the way we buy, and it’s revolutionized the way we sell. The choice of name for a new company, service or brand now starts with searching for a domain name that no one else has registered.

How to Prepare for a Web Hosting Migration to Alibaba Cloud

Compared to a traditional server-based network, a cloud-based network improves business agility and helps you deploy new features and applications faster. Cloud web hosting greatly simplifies the operations and maintenance (O&M) of your organization’s IT infrastructure, freeing you from manually provisioning hardware based on website traffic.

0 0 0
Share on

Alibaba Clouder

2,605 posts | 747 followers

You may also like

Comments