Subscribe to Our Newsletter

x

How to Schedule Newsletters on RebelMouse

Email campaigns are a great way to interact with your most engaged audiences, which is why we've created an intuitive way to send emails right from our Entry Editor. RebelMouse has robust newsletter integrations that allow you to easily send out a post as a newsletter, as well as set up daily and weekly recurring emails directly from the platform.

Here are two step-by-step guides on how to schedule newsletters on RebelMouse.


Send out a Post as a Newsletter

First, to enable the feature, your site must have the extra Enable Newsletter Tab in Entry Editor set to True.

Once that's enabled, the Send Post as Newsletter option becomes available within the Send a Newsletter tab in Entry Editor.

When your post is saved, the platform will call newsletter.tasks.send_post_as_newsletter. It will then be processed on newsletter.send.SendExternalProviderPostAsNewsletter.

All sender classes have a debug parameter which defaults to False. When it's set to True, it will do all the processing while skipping the calls to Mailchimp/Sailthru's APIs. It will add records to the diagnostics module, allowing developers on our end to debug any information about the newsletter processing.

Sites using a default RebelMouse template will send the post's complete HTML to an external provider, while those using custom templates will send a list of variables to the external provider. Review the next section to see a complete list of available variables.

Sender classes are smart enough to detect if a campaign already exists on a server to choose if we should add to or update a campaign.

Template Variables

Variable Name

Description

post_url

The post's URL.

E.g., http://www.rebelmouse.com/my-post-1.html

bookmark_url

The URL that's used to save a post to read it later. This is the post_url with the "?with_save=1" parameter appended.

E.g., http://www.rebelmouse.com/my-post-1.html?with_save=1

post_id

The post's ID.

roar_id

The site's ID.

authors_names

A list of strings containing author names. The order of their appearance is the same as what has been defined in Entry Editor.

Mailchimp Integration: See the special notes section below.

authors

A list of dicts with all attributes related to the post's author. The order of their appearance is the same as what has been defined in Entry Editor. Available fields are detailed in the following table.

created_date

This is the post's created date using the format: MMM DD.

E.g., Jan 01

list_name

The destination list's name.

header

The post's headline.

subheader

The post's subheader.

newsletter_alert_text

The alert text in the "Send a Newsletter" tab in Entry Editor.

before_listicle

The text that comes before the listicle items list.

listicle_items_list

A list of listicle items in the post, including all attributes available in our database. Available fields are detailed later in this guide.

Mailchimp Integration: See the special notes section below.

related_posts_list

A list of related posts items in the post, including all attributes available in our database. Available fields are detailed later in this guide under the "listicle_items_list" section.

after_listicle

The text that comes after the listicle items list.

imageXXXX

The lead image of the post in different resolutions. Instead of XXXX, use the proper resolution. Common resolutions are: 35x35, 210x, 300x, 600x, 980x, and original.

Mailchimp Integration: See the special notes section below.

"Authors" Dict Details

Variable Name

Description

id

site.id

site_id

site.id (for backwards compatibility; use this only when necessary)

owner_id

site.owner_id

name

site.name (uses underscores instead of spaces)

title

site.title (has spaces between words)

avatar

site.display_logo

about_html

site.about_html

description

site.description

"listicle_items_list" Details

Variable Name

Description

id

A listicile item's sequential ID.

index

A listicle item's index.

basename

A slugified version of a listicle item's headline (spaces are replaced with hyphens "-").

is_first

This is only added to the first item of a listicle list to indicate that it's the first item.

is_last

This is only added to the last item of a listicle list to indicate that it's the last item.

headline

A listicle item's headline.

item_permalink

This is the post_url with the parameter "?rebelltitem={listicle_id}" appended.

is_image

This indicates if the listicle item contains an image.

item_anchor

This is the anchor that's appended to the end of the post_url that allows you to navigate directly to the listicle item.

E.g., #rebelltitem1

body

The HTML of the listicle item's body, which contains shortcodes that can only be processed on RebelMouse.

Important: This should not be used in email templates. Use the "description" variable instead.

description

The HTML of the listicle item's body, which replaces shortcodes that can only be processed on RebelMouse with proper HTML tags.

image_id

The image_id used in the listicle item.

item_bookmark_url

The URL that's used to save a listicle item to read it later. This is the post_url with the "?with_save=1#rebelltitem{listicle_item.id}" parameter appended.

media_html_desktop

The HTML code that's used for desktop sites with a listicle item that has lead media.

media_html_mobile

The HTML code that's used for mobile sites with a listicle item that has lead media.

thumbnails

This is the dictionary containing different sizes of any media.

post_id

This is the post's ID.

imageXXXX

The lead image of the listicle item in different resolutions. Instead of XXXX, use the proper resolution. Common resolutions are: 35x35, 210x, 300x, 600x, 980x, and original.

Mailchimp Integration: See the special notes section below.

Mailchimp Integration: Special Notes

Repeatable Content

Mailchimp allows you to add repeatable content to your templates by adding the attribute mc:repeatable to an HTML tag. For example:

<div mc:repeatable="listicle_items" />

We also give meaningful names to blocks, but they're not accepted by Mailchimp. When we send data to their API, we must send repeatable data in a specific order.

We send two repeatable blocks to templates:

  • authors_names, which is rendered as "repeat_1"
  • listicle_items_list, which is rendered as "repeat_2"

Even if we don't want to show author names in a template, they must be declared before the listicle items list — otherwise, the listicle will not display correctly.

Names of Authors

To use author_names in Mailchimp, we need to use both the repeatable content and author names attributes. For example:

<div class="author_names" mc:repeatable="author_names">
 <p mc:edit="author_name">Author Name</p>
</div>

Editable Image Areas

Mailchimp uses the mc:edit attribute, which can be added to many HTML tags, to indicate that the content will be dynamically updated. The <img> tag allows it, but it indicates that users can only change the image from Mailchimp's Editor. The API can't modify this attribute.

As a workaround, when we need to display an image, we need to add in <div mc:edit="my_image_variable">. And instead of using an imageXXXX attribute, we must use html_imageXXXX, which will be rendered including the <img> tag.

For example, if the image2000x value is: https://assets.rbl.ms/9904159/2000x.png.

Then the html_image2000x will be:

" />

Debug Script

A good starting point for debugging any issues with sending out posts as newsletters is by calling the Send object, and passing the debug=True parameter. It will run all logic, but skip the external provider integration at the point that would create/update/send/schedule the campaign. So all data will be logged in the diagnostics module.

from newsletter.send import SendExternalProviderPostAsNewsletter
sender = SendExternalProviderPostAsNewsletter(post_id, debug=True)
sender.run()

Daily + Weekly Newsletters

You can set up recurring newsletters right from within RebelMouse. Here's a step-by-step guide of how to set up the feature correctly.

There are three crons to trigger newsletter processing:

  • /crons/mailchimp_create_campaigns.py, which handles daily newsletters for Runners
  • /crons/roar/daily_mailchimp_campaigns.py, which handles daily newsletters for Roars
  • /crons/send_weekly_enterprise_newsletters.py, which handles weekly newsletters for both (Roars and Runners)

The site will be processed only if one of the newsletter options is enabled in your Dashboard:

Daily newsletters are enabled by selecting the option "Send a daily newsletter to my subscribers."

Weekly newsletters are enabled by selecting the option "Create campaign with my most popular content from the week."

Classes on newsletter/send.py handle the newsletter generation and delegate the work of get posts from the database to newsletter/source.py.

All sender classes have a debug parameter which defaults to False. When it's set to True, it will do all the processing, but skip the calls to Mailchimp/Sailthru's APIs. It will add records to the diagnostics module, allowing us to debug any information about the newsletter processing.

Sites using a default RebelMouse template will send the complete HTML to an external provider, while those using custom templates will send a list of variables to the external provider. Check out the next section to review a complete list of template variables.

Sender classes are smart enough to detect if a campaign already exists on the server to choose if we should add or update the campaign.

Logic to retrieve posts for a newsletter:

  1. Get the MAX_POSTS_LIST_SIZE recent posts.
  2. Filter out the posts added only to private sections.
  3. Split posts into two groups: popular (those manually added to the /popular section) and not-popular.
  4. Only get the MAX_POSTS_ADDED posts from the popular group. If we don't have enough posts, then get the remaining posts from the not-popular group.

Asynchronously call the task to create the campaign:

  1. By calling the task asynchronously, it allows for retries in case of any temporary lack of service by the external provider and processes the next site faster.
  2. A daily newsletter calls add_mail_list_campaign, while a weekly newsletter calls add_enterprise_mail_list_campaign.

Template Variables

When a site uses a default RebelMouse template, the newsletter's HTML content will be generated in our platform and sent out to the provider.

However, when a site uses a custom template, we need to send out variables that you can then use in a template:

Variable Name

Description

rm_site_title_avatar

This displays the site's logo and name.

E.g., http://jmp.sh/TKjLXT5

rm_social_networks_without_avatar

This displays a bar that enables newsletter recipients to share your site on Facebook, Twitter, or through email.

E.g., http://jmp.sh/AbaKAeZ

rm_social_networks

This displays a combination of rm_site_title_avatar and rm_social_networks_without_avatar.

E.g., http://jmp.sh/D1SSGv6

rm_posts

This is HTML containing a full list of posts, including the lead image, a post brief, and the "Keep reading..." option.

E.g., http://jmp.sh/TcTn1gm

posts_list

This is a list of posts with a lot of independent variables to give users the flexibility to customize their templates. Each post is an element of the list. Each post also has the same variables described above in the "Send out a Post as a Newsletter" section.

Samples:

rm_site_title_avatar

rm_social_networks_without_avatar

rm_social_networks

rm_posts

Debug Script

A good starting point for debugging any issues with sending out daily or weekly newsletters is by calling the Send object, and passing the debug=True parameter. It will run all logic, but skip the external provider integration at the point that would create/update/send/schedule the campaign. So all data will be logged in the diagnostics module.

Remember to enable the daily/weekly newsletter option in your Dashboard, otherwise the newsletter won't be processed.

# Daily Newsletter

site_ids = [999] # Replace it with the site list you want to process
from newsletter.send import SendDailyExternalProviderNewsletters
sender = SendDailyExternalProviderNewsletters(site_ids, debug=True)
sender.run()

# Weekly Newsletter

site_ids = [999] # Replace it with the site list you want to process
from newsletter.send import SendWeeklyExternalProviderNewsletters
sender = SendWeeklyExternalProviderNewsletters(site_ids, debug=True)
sender.run()

If you have any questions about scheduling and sending out newsletters, please email support@rebelmouse.com.

Related Articles:

Tour the Newsletter Dashboard

Overview: RebelMouse + Mailchimp Integration

New Feature Alert: Mailchimp Groups Integration

NEW! Newsletter Integration with WhatCounts

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x

Easily Snap RebelMouse Into Slack

RebelMouse offers a Slack integration that allows you to sync your editorial process with Slack's notifications. We can set up three events that trigger notifications:

  • Changed stages in the editorial process
  • Edited a post
  • Published a post
Keep reading... Show less

A Seamless Transition: Introducing RebelMouse to New Team Members

Behind every site powered by RebelMouse, there's a team of dedicated content creators, storytellers, developers, and leaders who are working to make sure their site is growing and flourishing. Sometimes, these teams fluctuate as new members join and others leave.

Keep reading... Show less

How to Use Variables to Set Colors Across Your Site

Why This Is Important

You can easily set colors for every element of your site on RebelMouse, including the color of your text, links, and headlines. Usually there's a set of 2–3 colors used across a site. But instead of hardcoding the color on every element, you can use variables to make it so that if a color needs to change, you can update it in one place instead of everywhere — making future maintenance easy.

Keep reading... Show less

Learn More About RebelMouse’s High-Performing Infrastructure

To ensure every site powered by RebelMouse is high performing, secure, and optimized for user experience, we only use the best and most reliable methods to host our infrastructure. Here's a detailed look at some of the services and security measures we use every day to secure maximum stability and security for each of our sites.

Click here to learn more about what makes RebelMouse secure, stable, redundant, and high performing.

Services

Stateless services, such as application services for front end and back end tasks, are deployed within an Amazon Virtual Private Cloud (VPC) into multiple availability zones using Amazon Auto Scaling groups. Every service deployment is automated and can be done without an operator. Auto Scaling groups eliminate the need for manual recovery procedures in the event of hardware-related incidents. Additionally, Auto Scaling groups for stateless services provide the ability to balance resources according to current load.

Stateless services include:

  • Front end and back end applications
  • Background workers
  • Dedicated services for paid content and statistics

All interactions with our internal services are done via Amazon Elastic Load Balancing (ELB). Load balancing allow us to control the flow of all incoming traffic and reroute it to the group of instances that are available as necessary, which covers any networking and hardware issues. Every load balancer controls the health of the listener instance by regularly performing health checks and removing failed instances from production environments.

Load balancing and Elastic Compute Cloud (EC2) instances provide monitoring services with resource consumption data. Stateful services such as MongoDB, Redis, and Memcached are deployed within a VPC into multiple availability zones using Auto Scaling groups. Every data service has backup, recovery, and automatic failover procedures. Backup and recovery procedures are integrated into Auto Scaling groups and tested regularly.

Services performance is monitored by internal and external tools:

  • Sentry is used to track errors.
  • New Relic is used for application performance monitoring.
  • Amazon CloudWatch is used to monitor performance extremes.
  • Monit, Nagios, and Cacti are used to monitor metrics per instance.

Security

Defense in Depth (DiD) standards are adhered to and applied at all levels:

  • Amazon Web Services (AWS), such as Identity and Access Management (IAM), and CloudTrail
  • VPC and subnets
  • Load balancers (security groups)
  • EC2 instances
  • Operating systems use permissions-based controls

Access Monitoring:

  • AWS CloudTrail monitors all activities in our production data centers and grants us the ability to perform audits

Data Protection:

  • Secured storage
  • Encrypted transition protocols
If you have any questions about RebelMouse's technical infrastructure, email support@rebelmouse.com.

Stepped Entry Editor: Guide Your Users Through Content Creation

Small, dedicated teams can create quality content that helps your site grow traffic organically. RebelMouse's platform enables multiple communities with granular permissions and simplified contribution tools to create a collaborative workflow built for creators.

Keep reading... Show less

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x

How to Fix: Invalid Twitter Card

Sometimes when you share a RebelMouse article to Twitter, it will render the tweet without a Card:

Keep reading... Show less

How to Fix: Facebook Image Sharing Error

Sometimes when you share images on Facebook that are in the body of the post, the following error will occur:

"Can't load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings."

Keep reading... Show less

When to Use the Post Content Element’s Lead Media Properties

RebelMouse's Layout & Design tool makes designing your site easy and intuitive. But there are certain design factors you need to take into account when building out your site.

When creating a post page (i.e., the landing page for any article that a user is directed or navigates to), styling it is slightly different from other pages because it requires you to use the Lead Media property of a Post Content element. Within the context of our Layout & Design tool, "Lead Media" is defined as the main post tied to a post page's URL, which includes all of its images, media, and text.

By contrast, the Posts element displays all other articles (or posts) that aren't the main post you land on. These are the subsequent posts on a page that appear afterward as you scroll — such as in an infinite scroll setup, for example.
Keep reading... Show less

Cross-Site Shareable Elements on RebelMouse

We now have a new feature that will be very helpful for clients that have multiple sites and/or a site network powered by RebelMouse: Cross-Site Shareable Elements. This new feature makes styling work much easier since users are able to update several site layouts at once by editing a single element. This should also prevent duplicating code in similar site layouts, as well as saving users some coding time.

Keep reading... Show less

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x
Subscribe to Our Newsletter

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x