Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
You can automate the creation of email, both HTML and plain text. In this video, we will show you how to automate emails with ExpressionEngine, a web site publishing tool. To automate an HTML email with ExpressionEngine, we will follow these steps. First we will create a Custom Field group with three fields: Story, which is a text area; Logo, which is an image; and the Explorer Icon, which is an image. Then we will write down their field names. The Logo corresponds to the logo in our HTML email for each to tour; story corresponds to the description, or story used for each entry; and the Explorer Icon relates to the explorer button for each tour entry.
After we create our Custom Field group, we will create a channel called Newsletter, and ExpressionEngine channels are simply buckets into which you can collect a whole set of data. Then we create content for the channel called Newsletter, and we will add a Story, Logo, and Explorer Icon for each of our entries. Finally, we will create a template group called Newsletter, and then we will add our HTML email code, and we will update the code with ExpressionEngine template code, so that it displays the latest four entries for more channel called Newsletter.
Let's begin. The first step is to create the custom field groups. To do that, we click the Admin button at the top > Channel Administration > Custom Fields. We have created a channel field group called the Basic Story, and in this group we have three custom fields. If you need to create a channel field, click the red button at the top Create a New Channel Field Group. Click Add/ Edit Custom Fields to see our three fields.
We have Story, Logo, and Explorer Icon. The field name gives us the names that we will need in our template code later; therefore probably we should write these down. And within the Story field, it's important to note that the default text formatting for this field is set to None. That prevents ExpressionEngine from adding paragraph tags or any other HTML. You also might want to select Yes underneath, so that you can override the default text formatting at the story level.
The next step after we create our category fields is to create a channel. We click Admin > Channel Administration > Channels. We have created a channel called Newsletter. If you need to create a channel yourself, click the red Create a New Channel button at the top. Our channel Newsletter allows us to collect Stories and other data that relate to our newsletter. The third step will be to create a template group so that we can add our code.
To do that, we click Design > Templates > Edit. We have a template group called Newsletter, and we want to look at the index file within that template group. If you need to create your own template group, click Design > Templates > Edit > Create Group. Each default template group includes an index file and a full story file. In this case, we already have a Newsletter template group, and we are in the index page for our template group.
We have added our HTML code and if we scroll down, we have added the ExpressionEngine code. It pulls entries from the channel called Newsletter, which we set up. It limits entries to four entries. We've put in with curly brackets the field name for our logo, the field name for our story, the URL for our story if someone clicks the Explorer icon, and finally, the URL for our Explorer icon field. And down here we close our ExpressionEngine tag. Click View Rendered Template to see our template.
Now we've created our HTML email template in ExpressionEngine so that it is automated. Right now, we have four stories. We can update these stories at any time, and they will appear above or below the stories we currently have assigned to our channel called Newsletter. This video shows the general way to automate the creation of emails with ExpressionEngine. You'll need to refer to any online documentation by ExpressionEngine if you want or need more technical details.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 64672 Viewers
80 Video lessons · 124298 Viewers
52 Video lessons · 60237 Viewers
59 Video lessons · 46066 Viewers