InimistTech Blogs

Web & Mobile App Tech Weblog

  • Home
  • Laravel
  • React
  • Javascript
  • Linux
  • PHP
  • git
  • WordPress
  • Hindi to Unicode

Configuring email formatting in Drupal while using Messaging & Notifications modules

Updated on Sep 7, 2011 Arvind KumarDrupal

In drupal 6.x having messaging and notifications modules enabled you may want to configure the HTML formatting of your emails. By formatting i mean by showing emails in more readable manner, having some basic HTML tag support, line breaks, links etc. To choose an email format for Emails i would go to http://mysite/admin/messaging/settings/method (shown in image below)

Configuring email formatting in Drupal while using Messaging & Notifications modules
choose Filtered HTML as an option for Drupal mail. I choose Filtered HTML as i do not want any fuss coming into my emails except normal paragraphs and line breaks along with some basic styling like bold, italics, ordered and unordered lists. I have seen that , by default, “Filtered HTML” supports <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> tags. So what if i wanted to add a <p> tag to filter list of Filtered HTML option? Just navigate to http://mysitename/admin/settings/filters/1/configure or equivalent and insert <p> tag into Allowed HTML tags: field and save configuration (see figure below).

Configuring email formatting in Drupal while using Messaging & Notifications modules - adding tag to filtered html

Now our emails are good to receive <p> tags.

Additionally, having Messaging and Notification modules enabled we have extra option to format email templates for notifications. Let’s presume that we wanted to make an extra line after the greetings note in the emails. (Fyi, you can access all notification templates at http://mysitename/admin/messaging/template) For example i received the following as notification:

Arvind,
Here is the text of the latest post for your group:
Here’s the content of your post, multiple lines

but i wanted to make and an additional line break after first two lines. So i edit the template using http://mysitename/admin/messaging/template/edit/notifications-event-node-insert to make it have:

[user],

Here is the text of the latest post for your group:

[node-body]


I receive much more readable emails now.

facebookShare on Facebook
TwitterTweet
FollowFollow us
PinterestSave

Also Read

  • Sending Laravel Notifications Email to Single Email Address

    Laravel Notifications system is an inbuilt notification system in Laravel Framework. It supports…

  • Drupal "disk quota per user has been reached" settings

    When a certain number of uploads is reached Drupal would show errors, something…

  • Formatting date in a php smarty template

    The date string can be formatted in a smarty template like this: $payment.creation_date|date_format:"%d-%m-%Y"…

  • Ideal way to perform email validation in php

    I found this email validation function while working in ActiveCollab. By default, this…

drupal, drupal email formatting, drupal email notifications html, email notification formatting in drupal, messaging & notifications drupal

Post navigation

← Adding uTorrent program shortcut to Windows 7 taskbar
Adding php syntax highlight support to more extensions in gedit →
  • Useful Linux Commands
  • Enlighter Example - CSS
  • Disk Space Usage Commands
  • Top Directory Linux commands

Recent Posts

  • How to Create a Custom Gutenberg Block in WP (Step-by-Step)
  • How to Create User Roles and Permissions in Laravel 8
  • Creating a Wp Angular Theme for WordPress with Gutenberg
  • Understanding Cookies in PHP
  • How to Create a PHP Session

About Arvind

Arvind Thakur is a Full Stack Web Developer. He founded and runs a Software Development company by the name Inimist Technologies in Chandigarh, India. >> know more
Copyright © All rights reserved.
Blog Kit by WP Charms
Facebook
fb-share-icon
LinkedIn
Share
WhatsApp
Follow by Email
Twitter
Post on X
Reddit
Pinterest
Instagram
RSS
Telegram