Set up Papercut SMTP for Sitecore EXM in a Docker container.
Akif Irfan
Sr. Sitecore Consultant @ Edari | Sitecore? 9.0 Certified Platform Associate Developer
For the sake of testing the EXM campaign, we'll configure PaperCut SMTP using a Docker container. Since no emails are transmitted to actual clients, PaperCut is an efficient SMTP server that can be used in testing or development environments.
We need Docker installed on our computer to configure PaperCut SMTP. Because there are so many online guides for setting up Docker, we won't discuss it here. If Docker hasn't already been installed, please do so by following the instructions on the Docker website.
Docker is not required to install PaperCut SMTP. It is directly installable on our personal PC. However, we'll use Docker in this tutorial. If you're unfamiliar with Docker, you should grasp its core. Using Docker, you'll develop substantially more quickly and easily as a result. On its website, there is a plenty of documentation.
Install PaperCut SMTP
Let's get to work and install PaperCut using Docker locally. Start PowerShell with administrator access and perform the following command to install PaperCut; this will take a few minutes.
docker run --name=papercut -p 25:25 -p 37408:37408 jijiechen/papercut:latest
The aforementioned command will create?and start?a Docker container for PaperCut. To verify that?Papercut is properly installed, open https://localhost:37408/ URL in the?browser.?It should?show the?inbox to?view the test emails (view the below image).
Configure custom SMTP for EXM
To send emails from Sitecore, the SMTP server setup is necessary. For the sake of this guide, we set up PaperCut SMTP because we believe it to be incredibly easy to configure locally and the best option for doing testing without sending emails to real user accounts. Please adhere to the guidelines below.
Steps:
We will use port 25 because PaperCut SMTP is listening on this port. If we carefully see the bold highlighted part of the command (used to install PaperCut in Docker) it is showing port on which its listening. In case any other port will be used while isntalling Papercut then set the same port in <smtpSettings><port>[25]</port>
Sample Emails List
Before we can see the EXM in action, we must build up a sample recipient email list. The email list can be conveniently uploaded using the list manager. I'm going to upload a CSV file with the first name, last name, and email addresses here. The file should be formatted as follows:
The best part is that all emails will be sent to the PaperCut inbox (https://localhost:37408/) where we can verify the email body/links etc
Next, go to the Sitecore launch pad > marketing application > list manager >
Select Create > Create list from file >
It will display the Import Contact Wizard. Upload the CSV file that you made in the previous step.
Browse the File:
Click the Upload file button after changing the list's name (optional).
?Map the file column to the Sitecore column field:
领英推荐
When you press the Next button, Sitecore will import and build the contacts from the file. These imported contacts will be used to send emails via EXM.
We have already taken care of all the necessities. It's time to have some fun with the Sitecore EXM module by launching our first email campaign using it.
Click on Email Experience Manager in the Launch Pad.
Create the email campaign >?Click create > Regular Email Campaign >
Choose a template from the list; I went with a simple HTML message and called it "exm first campaign" for demonstration purposes.
Configure the campaign's name, description, and other essential details under the general information section. In the sender area, you may customize the "from name" and email that will appear in the email box.
The sender information influences various click rates, so this information is crucial.
Select your list of recipients now. We already built this list in the preceding phase; all we need to do is provide the reference, as seen below:
The Message tab is the next one, and since we've already chosen the very simple Custom HTML template, we can just create an example HTML message for testing purposes as shown below:
You can experiment with the HTML, choose another predefined template, or import a custom HTML template.
We're all set and prepared, but remember that "prevention is better than cure"
Before rolling out to the consumer, we should always test our campaigns. Sitecore has this function called "Review," which implies actual Review, therefore send the test email first. You may send several test emails by using a comma as seen below:
Let me quickly check my mailbox to see if there are any new emails. Indeed, I received the email below in a matter of seconds:
Verify your email for previews and testing.
I'll briefly go through the test email now, and if you like the content and formatting and want to send it to every receipt, click the "next steps to delivery" tab: Activate the Send message button. Boom – job?completed.
The real email should look like this:
I hope you find this information beneficial.
With Sitecore EXM, good luck.
2*Sitecore Certified (10.X, 9.X)
1 年Akif Irfan https://localhost:37408/?URL in the?browser.?It should?show the?inbox to?view the test emails (view the below image). [Question]: where it's showing emails from?