If your website with one of WordPress themes is open for the enrollment or a forum with alerts, your site will probably send a lot of emails. All of them are, by default, are sent via a standard transfer of emails system. This simple approach does not require any additional configuration, and letters are sent very quickly. However, it imposes serious disadvantages.
As the number of messages and the importance of such an approach is already a stretch be called valid and uncommon problems. For example, your mail sent the site may fall into the spam or not reach the recipient at all.
In most cases, the decision may be sending letters through third-party services, such as Gmail mail for your domain (SDA). You can also choose to send mail through your own mail server, which, as a rule, have even the most basic web hosting.
Disadvantages of email servers using the transport system for websites with WooCommerce themes
As noted above, sending emails on websites with WooCommerce themes, by default, it operates without any additional settings, but this price is very high:
- Messages may fall into the spam box
About all the spam filters and methods of checking emails, working, for example Gmail, probably know only the employees of these companies. Despite the large number of closed from prying eyes of tools for checking incoming shipments, there are several things that can increase confidence in e-mail service to your letters.
An email sent via the system transport, does not contain additional electronic signatures, which may indicate the reliability and legitimacy of a sender. Perhaps many of you know that anyone can send a letter to someone else’s address, for example, with firstname.lastname@example.org without having any access to the domain and a website with one of WooCommerce themes.
Sending messages via the mail service will allow to automatically add DKIM-signature, indicating the reliability and legitimacy of a sender. The sending server (SMTP-servers) and Gmail will automatically add the DKIM-signature to every email. They only domain owner (DKIM and private key) can send mail with the correct DKIM-signed.
The DKIM-signature does not negate the fact that someone else will be able to send an email using your address (email@example.com), but the receiving mail server will see that the letter sent by someone else, instead of the domain owner.
SPF-record set in domain settings (DNS) domain and allow the owner to show mail services from what servers can send emails in this domain. Each e-mail service offers its own SPF-record with their server list.
- Messages may be missing
Another method, which is used to screen out the bad postal service letters – is Greylisting. Here, at the time of sending the letter, the receiving server can respond to your site something like “I’m busy right now, come with this letter in ten minutes”. The website with one of WooCommerce themes does not know what to do in such a case – the letter was handed over to send, that’s it, so emailing just lost and will not be delivered to the addressee.
If your letter is sent to the mail service, your sending server will say “OK, Google” put the letter of all unsent mail and will try to get him a few more times. The calculation is simple – when you send a large number of mail in a short period of time, as is usually done by spammers, do not have time to try to deliver the letter several times.
Do not walk, and a letter can, if the receiving server just for the time off or lost access to the network. Therefore, sending emails via SMTP more secure.
- Sending emails via SMTP
The principal difference between sending e-mail through an external service (Gmail) or your own SMTP-server is not. It is the same. But if you decide to use your own hosting or a dedicated SMTP-server, you should pay attention to its settings. Do not forget to set the correct DKIM- and SPF-records in domain settings.
Google does not prohibit the sending of emails through their servers in this way, but they have some limitations on the number of messages sent per day. For example, Gmail has clearly specified limit of 2000 emails a day.
Note that many web hosting sites to connect to external servers are blocked (information is available to support the hosting or with the telnet command). In this case, you can ask for support for hosting allow connections. Sometimes such requests may be taken into account. Or, use the internal mail server provided by the hosting provider. As a rule, it will run even faster than the outside, because it is usually located on the same physical server as your website with one of WooCommerce themes (web server).
On personal experience, it was observed that Gmail for your domain does not store emails sent through the SMTP-server in the outbox folder and retains Gmail.
WP Mail SMTP plugin for websites with WooCommerce themes
All emails sent to WordPress via wp_mail () function, which works on the popular PHP Mailer library. To allow WordPress and wp_mail () to send emails through SMTP-server must be set up and configure the plugin WP Mail SMTP from the official WordPress.org directory:
- By activating the plugin, go to Settings → Email in the Control Panel;
- Let us setting on the page Advanced Email Options. The following shows the description and the required values for each item;
- From Email – address from which the system will be sent and that the recipient send the answer by clicking “Reply” in their email;
- From Name – sender’s name, you can specify the name of the site or your first and last name;
- Mailer – sending messages via the system transport (function mail ()) or through SMTP-server. Choosing Send all WordPress emails via SMTP;
- SMTP Host – the address of the SMTP-server. You can ask the technical support or in the reference section. To use Gmail – smtp.gmail.com;
- SMTP Port – SMTP-server port depends on the type of encryption (Encryption). For Gmail use port 465;
- Encryption – encryption type. you must install the Use SSL encryption for Gmail;
- Authentication – whether to perform authentication on the mail server. Set Yes: Use SMTP authentication in WooCommerce themes;
- Username – username of the mail. As a rule, the full address of the mailbox must match the value specified in the From Email;
- Type the password of the mailbox;
- After saving the settings, you can send a test message. To do this, enter the address of your mailbox and click Send Test. At the specified address will be sent a short letter, and service information with the results displayed on the screen. Check that the letter arrived to the specified address? If it is not, then something is not configured correctly and WooCommerce themes cannot send mail.
View message headers in Gmail server in WooCommerce themes
The message should contain the title bar «Authentication-Results». If DKIM and SPF are configured correctly, you will see the spf = pass and dkim = pass.
spf = pass (google.com: domain of firstname.lastname@example.org designates 2a02: 6b8: 0: 1630 :: 18 as permitted sender) email@example.com;
dkim = pass firstname.lastname@example.org
Gmail shows a green check mark next to the letter, if DKIM-signature is valid.
Sending emails through SMTP-server more reliable and correct way to deliver letters. To use SMTP does not necessarily deal with the setting up and administration of e-mail servers. Google services are well cope with the task, and that is what is necessary for a small project.
In a case there are any questions left about the use of Gmail STMP server on one of websites with WooCommerce themes and WordPress templates, please check our forum.