Magento 2 emails complete manual: setup, template modification, sending newsletters. Check it out!

Magento 2 emails complete manual: setup, template modification, sending newsletters. Check it out!

Did you know that even with default Magento 2 email sending settings it is possible to evolve a nice email marketing campaign? What you need is to configure your emails well.

In the email setup manual, we are going to help you with the settings order. We will show you the guidelines on how to send emails both to customers and to admin users as well as to send newsletters. You will see complete information about Magento 2 email templates.

Read the manual to know how to configure SMTP to prevent Magento 2 emails from going to spam. We'll also discuss how to add attachments, PDF files and images to the email. Let's begin.

Magento 2 email sending

Store email address configuration

Your first steps will be the following:

  • Setting up an email address. It’d go very nice if you register email addresses with your own domain. We consider it a professional email address choice. It has a lot of benefits including the way to highlight your brand identity. Despite what you decide, Magento 2 allows for using generic email addresses and setting magento default email domain. When you register your email address, ask your email hosting provider for instructions.
  • Configuring email addresses for the store. Magento 2 enables up to five different email addresses to represent various departments for your store.
  • Update the sales emails configuration. You will have to update the configuration of any related email messages to make each corresponding sender appear in all of them correctly.

Well, go to Stores - Settings - Configuration - General - Store Email Addresses.

Here you have to specify contact email senders for General contact, Sales representative, and Customer support. Magento allows for setting up Sender Name and Email values also for two custom emails.

Please save the updates.

Then you have to ensure you’ve set the correct email contacts for each relevant sales message. In the next section, we talk about that.

Sales email configuration

Even without any Magento 2 email module, you can easily set up sending of the email messages supported by default:

  • Order, Order Comments, Order Ready For Pickup in Store
  • Invoice and Invoice Comments
  • Shipment and Shipment Comments
  • Credit Memo and Credit Memo Comments
  • Payment failed email
  • Welcome email after account creation
  • Password reset email
  • User notification

Those last 4 email messages we’ll be seen below in separate parts of our manual.

In this section, we’ll consider order sales emails only. Go to Stores - Settings - Configuration - Sales - Sales Emails.

Here we set up Magento new order email message as an example. Follow the steps below:

  • Set Yes in the Enabled field. If so, you enable sending the email notification about order confirmation every time a customer shops at your website.
  • Choose a sender for the new confirmation email. Make sure you assigned a proper sender - a Sales Representative. Magento 2 allows for choosing order confirmation email templates for both guests and registered customers.
  • In the New Order Confirmation Template field, you have to choose the email template for registered customers. Later we’ll show you how to create the most appealing order confirmation email within the Magento 2 email templates functionality.
  • In the New Order Confirmation Template for Guest field, you have to choose the email template for guests.
  • In the Send Order Email Copy To field, you can enter many email addresses separated by a comma.
  • In the Send Order Email Copy Method field, you have to select the way to send an email copy. You can choose between 2 values. If the BCC, the Magento will send a “blind carbon copy”. The email will include other recipients in the header of the same message you sent the customer. If you choose Separate Email, Magento will send the copy in the form of a separate email.
  • Save the updates.

Configuring other sales emails is possible following the example of the order confirmation email. See more at Magento docs.

Payment failed email configuration

Go to Stores - Settings - Configurations - Sales - Checkout.

You will update the Payment Failed Emails section. The steps are similar to the sales email configuration.

Forgot password and User notification emails configuration

Magento 2 allows for sending emails to the admin users by default. Go Store > Settings > Configurations > Admin > Admin User Emails.

Follow steps:

  • In the Forgot and Reset Email Sender dropdown, choose a sender for the message.
  • In the Forgot Password Email Template, choose an email template. So admin users who clicked Forgot Password link could see that message.
  • In the User Notification Template, choose an email template that includes important notifications to your admins.  

Welcome email

Go to Stores - Settings - Configuration - Customers - Customer Configuration > Create New Account Options. You have to focus on the second part of settings.

There you are able to choose:

  • the email template used for the default Magento 2 Welcome email.
  • an alternate Welcome email template that is used for new customer accounts who don't have a password yet.

In the configuration field, please also choose the email sender and set if the email confirmation message is required. The welcome email configuration also allows for choosing another email template for sending in case a new account creation is confirmed. See more details at Magento docs.

Sending newsletters in Magento 2

Here we’ll keep working with the Customers section in Magento 2 admin.

You will see how to:

  • add users to your mailing list
  • configure the newsletter settings
  • set up the newsletter sending

Adding customers

You should ask for customer permission first. Please go to Customers - All Customers. There you have to choose a customer. Then go to the Newsletter tab, and check the Subscribed to Newsletter box. Press the Save Customer button.

Newsletter settings configuration

Go to Stores - Configuration - Customers - Newsletter.

Follow steps:

  • In the Success Email Template field, please choose a template that will be sent to customers after a successful subscription.
  • In the Unsubscribe Email Sender dropdown, choose a sender of the unsubscribe emails.
  • In the Unsubscription Email Template field, choose the email template that will be sent to customers after they unsubscribe.
  • In the Success Email Sender field, choose the sender of the successful subscription email message.
  • In the Confirmation Email Template field,  specify the template for the confirmation email.
  • Set Yes in the Need to Confirm field if you want to enable users to confirm their subscription.
  • In the Confirmation Email Sender field, choose the sender for the confirmation email.
  • Set Yes in the Allow Guest Subscription field to allow Guests and not logged-in users to subscribe to your store newsletters.
  • Save the updates.

Here you can learn more about managing subscribers.

Sending newsletters

Go Marketing - Newsletter template. Select the template and check the Queue Newsletter option from the Action column. You will see Magento 2 email queue table. Here you have to pick up a Queue Date start in the calendar. The date and time values are available to set in order to send the newsletter at a given time.

We talk a lot about sending emails. What if Magento 2 email not working. For example, it is not uncommon for emails to go into the spam folder. To avoid issues as well as improve your email reputation, we recommend sending emails using a secure mail transfer protocol or SMTP.

Sending emails via SMTP

Simple Mail Transfer Protocol (SMTP) is a protocol system that is responsible for receiving or transmitting data in customers’ emails. Magento 2 email sending settings don’t allow for sending emails through a third-party mail SMTP server.

In case you want to use Gmail, Microsoft, Amazon for sending, you have to set up an external SMTP service. It will give you the opportunity to deliver messages accurately to customers inboxes, not spam. Sending via SMTP is a must if your email message includes big files or videos. It reduces the time of transferring the data.

Try our Free Magento 2 SMTP Email module to simplify delivering messages through an SMTP server. It creates a secure connection with your reliable SMTP server. Besides, you get full control over custom SMTP server settings. With the extension, you get integration with most popular email providers.

Now that we've gone through Magento 2 email setup and sending steps, let’s focus on email templates.

Email Templates modification

During the email setup, we've been often choosing email templates for different purposes. Magento 2 doesn't recommend changing the default Magento files. To customize the default templates, you are required to create your custom templates and configure Magento to use these new ones.

Within the default functionality, you can add custom templates.

Go Marketing -  Communications - Email Templates. Click on Add New Template.

You can use a default template as a starting point. So then you have to choose the template in the Load default template section and press Load Template.

Follow steps:

  • In the Template Name field, enter a name.
  • In the Template Subject field, add a text. It will be used as the subject of the emails sent using the new template you create. This field allows for inserting transactional email variables.
  • In the Template Content field, you can customize colors, fonts and edit text.
  • In the Template Styles field, it is possible to customize template content. You may optionally add CSS styles inside of a <style> tag in the <head> of the email.
  • Save template.

After adding the template, you have to override it for each one email message. Go Stores - Settings - Configuration - Sales - Sales Emails. Here you have to choose a required template from a dropdown in the section you've created the template for.

Previously, in the manual, we promised to show how to create the most appealing order confirmation email.

With Magento settings, it is possible to add the store and sales-related information to a template, using system variables. You will find out the details in the user guide.

However, when it comes to adding the CSS, product images, or attachments, you are not allowed to easily customize the template. And sometimes you have to use custom modules.

Here we show you how to:

  • Customize Email Logo
  • Add product image to the email
  • Attach PDF file to the email

Change email logo

Go to Content - Design - Configuration - Transactional Emails section. Follow steps:

  • Upload the Logo Image.
  • Set the Alt value for the logo image.
  • Set the values for Width and Height. In case you uploaded the logo, the fields are not necessary. In case you selected the image from the gallery, please enter a size in pixels.
  • Choose the Header and Footer templates in the dropdown.
  • Save the updates.

Add product image to the email

In the default email template there is no product image. Here we can help you to add the image to the order details section. Try out the Email Templates module. It provides a quick and easy way to add the image to Magento 2 email templates. See details about display of ordered items with product images.

But not just that. It actually allows you to:

  • Change the design of specific email templates.
  • Include social media links in the emails.
  • Style emails with custom CSS in the advanced text editor with HTML syntax highlight.
  • Choose up to 5 custom designs for email templates.
  • Apply a custom design to all emails in a few clicks.

Attach a PDF File to email

Magento 2 doesn't add attachments to the order email. You may use a custom module to make it possible. The PDF Invoices module allows for adding PDF to sales emails as well as adding download links to email. Check the module manual.

In summary

In the end, we'd like to appreciate you for reading. Good job. It means that you are pros now. You learned more about Magento 2 email sending settings. You've tried setting up sales emails, welcome emails, newsletters.

So now you become closer to your email receivers. Our manual is always available for you. This is the quickest and convenient way to start with Magento 2 email marketing.

Keep contacting customers to inform them about your store news and special offers. In the next guide, we'll put you through creating email reminders and follow-up emails. Stay tuned.

Leave a Reply