E-Mails have a crucial part when it comes to promoting your brand and connecting and communicating with your sites customers and visitors. It’s much more effective than any other social media platform because the e-mails tends to have more personal communication rather than other fast forward platforms.
Sending emails to your all the customers on regular basis is a vital part of marketing but sometimes it becomes a little bit expensive and not the worth sending emails with third party services like Mailgun, Google Apps, Sendgrid and much more. And if you are having issues in sending mails from WordPress with these third party services then you should definitely read this article. In this article we will look at how to send Emails using your SMTP server.
What is the issue with WordPress E-mails
The WordPress CMS uses a mail function to to send emails in PHP. But many of the shared hosting providers do not have this mail sending function configured and enable by default properly. In this case, the mails are not properly delivered to the subscribers.
To recover from this situation, you need to use some third party email service like Mailgun, Google Apps for work, or Sendgrid to send out your emails. You can choose any service as per your requirement. You will have to pay for the services you use, the cost depends on how many users/accounts you add or the number of emails you send.
But you are having a much better option for sending the mails to your subscribers without paying extra for these services. You can use your existing hosting services to send the mails without throwing extra money on any service.
Most of the WordPress hosting providers offers us the email services for each domain we host with them. We can simply create email accounts with our own domain name, for example email@example.com.
For doing this, we will need to create an email account. Let’s have a look how to create an email account in cPanel. The hosting service provider may be using some other account management system, but the initial process is almost the same on most hosting services.
Log into your hosting account, and click on email accounts under the mail section.
It will show a simple form where we need to fill out information required to create the email account.
Ad we will be using this account to send WordPress emails, we recommend that you create an email account like firstname.lastname@example.org. Simple replace the example with your original domain name.
Once the email account is created, we are all set to use it in WordPress. Before we do that, we will be needing the following information from the hosting service provider.
1. SMTP Port for secure login.
2. SMTP Host for your email address.
Using Your Own Name Email Address in WordPress
Firstly, will need to install and activate the WP Mail SMTP plugin. With the help of this plugin we will be able to send emails from the WordPress.
Once the activation is done, just navigate to Settings » Email to configure the plugin settings.
We need to enter the email address we just created for WordPress, after that we can add a from name (the name from which the email will get sent). It’s good to add a from name, and if you do not provide the name then the plugin will use the default WordPress name.
Next, we need to select the mailer option, just click on the “Other SMTP” option to select it.
After that, check the box next to the Return Path option, this option sets the return path to match the sender email address.
It’s helpful to check this option because if its left unchecked then all the bounced messages and non-delivery receipts will be lost.
In the next, we will set up the SMTP options.
Next step, enter the SMTP host and port details. You can easily get this information from your hosting provider. Generally, the SMTP host is mail.yourdomainname.com and the Port 465 is used commonly.
After this step, choose an encryption method. Commonly used encryption algorithms are SSL and TLS. Both the methods are safe and highly secure. You can choose any of these, but our opinion is to go with the TLS.
The next step is to turn ON the authentication toggle and give your SMTP username and password. Normally, the email address is also the SMTP username. The password by default is stored as plain text. We will have a look how to make the password safe and secure. Click on the save button to save the settings.
How to test the SMTP Settings
It’s time to make sure that everything is working perfect. For testing, go to the plugin’s settings page and click on the “Email Test” tab. We need to provide an email address where we would like to receive the test email and just send the email. A Successful message will received once the email is successfully delivered.
How to make the email password safe?
As the password is normally stored as plain text which is unsafe and easily readable. But the plugin also provides us the option to make the password more secure. You just need to add couple of line of code to add the extra security.
For adding the code, you need to connect the site through FTP client or File Manager app in cPanel. Once you made the connection, find the wp-config.php file in the root folder of the website.
You can edit this file using any plain text editor like Notepad or TextEdit.
Locate the line that says ‘That’s all, stop editing! Happy blogging’ and add the following code just before it.
1. define( ‘WPMS_ON’, true );
2. define( ‘WPMS_SMTP_PASS’, ‘your_password’ );
After this, replace ‘your_password’ with your actual SMTP password, after that, save and upload the wp-config.php file back to the server.