Tweet This
Email How-To Tip

Q: How can I allow my subscribers to choose between receiving HTML or plain text emails?

For email newsletters and announcements, messages with HTML content have become a de-facto standard. Nevertheless, it's still a recommended best practice to include a plain text alternative version of the HTML content for those cases where subscribers are unwilling or unable to properly view an HTML email.

The slight drawback with this is that with subscribers who choose to view only the plain text alternative content, you still send out the full HTML email, and they have to receive and store that HTML email in its entirety, which is unnecessary if those subscribers are only interested in the plain text version to begin with.

The "Automatic Email Format" feature in LISTSERV Maestro addresses this concern. With this feature, subscribers who have explicitly selected a "text only" option will receive a simple plain text email that contains only the plain text alternative content. All other subscribers will still receive the full HTML content (including the plain text alternative, just in case).

The simplest way to use this feature is in combination with one of LISTSERV Maestro's own recipient lists.

In a stand-alone recipient list, as well as in a list group, you can add a profile field with the special data type "Only Text Email", as shown here using the sample list group from a default LISTSERV Maestro installation:

This "Only Text Email" data type behaves similarly to the "True/False" type because it allows subscribers to make a simple "Yes/No" choice. And in this case, "Yes" means: "I want to receive plain text content only", and "No" means: "I want to receive the full HTML message".

On the subscriber pages, this profile field can be displayed in three different ways, depending on the configuration that you select in the list (or list group) wizard, on the "Input Controls" tab of the "Profile Field Details" page:

Depending on the configuration, the field can be rendered as a simple checkbox, as a pair of radio buttons or as a drop-down list with two choices:

Each subscriber can then set this profile field accordingly and choose whether to receive complete HTML messages or plain text messages only.

And when later crafting the message content, the only thing that the LISTSERV Maestro user has to do is to supply an HTML message with an alternative text. This is done by making sure that the "Alternative Text" option is enabled in the content editor:

And as you can see in the image above, the "Automatic Email Format" option is automatically enabled to use the field with the special "Only Text Email" data type (in our case, the TEXT_ONLY field). Whenever a subscriber list with such a profile field is used, the "Automatic Email Format" feature will automatically honor each subscriber's choice regarding the desired format.

Of course, the feature can also be used even if the subscribers aren't stored in a LISTSERV Maestro subscriber list but have, for example, been uploaded from a text or spreadsheet file, or have been selected from an external database.

In such a situation, however, it's necessary that the imported data already contains a profile field (also called a "merge field") that somehow contains the subscriber's choice to receive either plain text or HTML content. And it must be possible to define a condition on this field that evaluates to "true" for all subscribers who are supposed to receive the full HTML email and "false" for all who are supposed to receive only a plain text email. Note that this is the opposite of the condition used by to the built-in "Only Text Email" field.

For example, the merge field can contain numeric values, where a 0 means "plain text email" and any other number means "HTML email". The merge field can also contain the word "yes" for HTML emails and "no" for plain text emails, like in the image below.

To specify this condition, when in the content editor (while editing a HTML email with the "Alternative Text" option enabled, as shown previously), click on the "Change" link of the "Automatic Email Format" option. In the dialog that opens, select the "Determine the email format automatically" option and then enter the desired condition in the field below:

With this condition, LISTSERV Maestro will then again automatically take care of each subscriber's mail format preference.

Got Feedback?

What kind of tech tips would you like to read next?

Get in Touch

Next Steps

© L-Soft 2021. All Rights Reserved.

Powered by LISTSERV Maestro