Opinionised Bracket

How to send email from website securely and log everything?

How to send email from website securely and log everything

Having a website or a blog comes with responsibility. Knowing how to send email from websites securely is one of the things every blogger needs to know.

Opinionised Bracket

Why default WordPress email settings are not recommended?

Every blog you build have default email functionality build-in. It is used to send automatic emails when people fill the form, sign up or lose their password.  

When I started my first blog I did not even know that I can configure my email settings in a more secure and deliverable way.

WordPress uses PHP mail() function to send emails. This default setting does not work 100 % as the emails are blocked by many known email providers like Google, Yahoo, or Outlook. Often they don’t even land in your spam folder.

The ultimate problem is that you don’t have control over this PHP default functionality. The emails are sent but not logged anywhere, so as a result, you don’t know what is send and if it was delivered.

So, how to solve this problem with SMTP?

Opinionised Bracket

What is SMTP?

SMTP stands for Simple Mail Transfer Protocol and it is an internet standard communication protocol to send emails over the internet.

All serious online marketing systems or email service providers use SMTP to send email securely and log all their activities.

WPForms created a free WP Mail SMTP plugin where you can set up your SMTP email provider in a few easy steps.

Currently, it supports the following email providers:

  • Sendinblue
  • SMTP.com
  • Amazon SES
  • Microsoft 365
  • Gmail
  • SendGrid
  • Zoho
  • Outlook.com
  • Mailgun
  • Other SMTP providers – you can use your web hosting provider, like SiteGroud or Bluehost, or use any third-party SMTP server.
How to send email from website securely
Source: www.smtp2go.com
Opinionised Bracket

How does WP Mail SMTP work?

WP Mail SMTP plugin replaces the default functionality of PHP mail() function with the settings from your email provider via API. 

It means that even your web host is blocking SMTP ports, your emails still work are they use a different service.

After you connect to your email provider, you also specify ‘from name’ and ‘email address’ fields. This way your email get even more trust.

Opinionised Bracket

What problems do you solve when using SMTP?

  • All emails are delivered – attaching your website to SMTP get trust so all your emails are delivered
  • Emails are not marked as spam –  SMTP authenticated emails will be recognized as legitimate and won’t be blocked by spam filters
  • Use your SMTP provider – you can select the right provider that suits your budget and business needs
  • White Glove Option – if you are not technical WP Form support team can do it for you
Opinionised Bracket

Why you should log all email activities?

When your website sends emails, the first thing you want to know is if it was delivered. 

By logging all email activities you always know when email was sent, from email field, recipients (including CC and BCC), subject, number of attachments, who was the mailer and additional technical details.

This way you can always check if something does not work.

How to send email from website securely with WP Mail SMTP
How to send email from website securely with WP Mail SMTP
Opinionised Bracket

How logging is set up in WP SMTP?

There are two options you choose from. 

First, you need to enable email by clicking Enable Log and by default, the WP Mail SMTP plugin will log all basic email information. 

However, you can also log all email content by selecting the Log Email Content option. You have to be careful when using full logging though, as the email content will be stored as unencrypted plain text in the WordPress database.

I recommend using Full Logging only for a very limited time, mostly for debugging purposes.

Opinionised Bracket

How to configure WP Mail SMTP with a web hosting provider?

Linking your WordPress website to WP Mail SMTP plugging is very straightforward and the first steps are the same for either Mailer you select.

First, navigate to the WP Mail SMTP General tab and provide From Email and From Name.

Then, you decide which Mailer you are going to use. If you want to use a web hosting mailer, you always select Other SMTP.

Then you need to provide SMTP details you take from your web hosting provider (check below) and populate the following fields in WP Mail SMTP.

  • SMTP Host
  • SMTP Port
  • Encryption
  • Auto TLS
  • Authentication
  • Username
  • Password

Once you populate all the fields click Save Settings.

Where to find mailer configuration in SiteGround?

  1. Navigate to SiteGround, select your website and click on Site Tools
  2. Navigate to Email->Accounts
  3. Create a new email account or if you have one click on three dots located on the right-hand side of your account.
  4. Click on Mail Configuration
How to send email from website securely - Siteground SMTP Details
How to send email from website securely - Siteground SMTP Details

      5. Click on Manual Settings and all you need is there.

How to send email from website securely - Siteground Mail Configuration
How to send email from website securely - Siteground Mail Configuration

Note that all web hosting providers have a similar set-up for email accounts so whether you use SiteGroundBluehost or any other provider this setting is normally located under your email accounts.

Opinionised Bracket

How to configure WP Mail SMTP with Sendinblue?

If you decided to use an email service provider, Sendinblue is one of the recommended ones by WP Forms.

The setup with an external email provider is even simpler. You need to provide two things:

  • API Key – it is a unique key you get from your Sendinblue account (check below)
  • Sending Domain – a domain name authenticated with Sendinblue

Where to find API Key in Sendinblue?

  1. Navigate to your account, SMTP & API setting
  2. Create and copy a new API Key.
  3. Enter the API Key in WP Mail SMTP form.
Sendinblue - API Key
How to send email from website - Sendinblue - API Key
Opinionised Bracket

How to send email from website securely and log everything? Executive Summary

Sending emails securely is as important as any other website activity we do. Making sure we do it right is vital to run the business successfully.

Should you use SMTP on your website? Definitely, it is the only way to ensure that all your emails are delivered and not marked as spam.

If you want to get more control, you can always set up a logging that will help you to see all the details.

Do you use SMTP for your emails? What is your experience with other email providers? 

Please leave a comment below.

Share on facebook
Share on twitter
Share on linkedin

Related articles

Mariusz Pecak

Content Creator

I am a software developer and blogger. Here you will find the best online tools and services to make your life easier.

My personal favourites
Best Customer Automation tool
Explore
Subscribe

Stay in the Loop

Get my latest software posts, online marketing tools reviews, and blogging tips delivered straight to your inbox.