From a79f71b48f250f659fcbbbc88c165fbe1deeffe9 Mon Sep 17 00:00:00 2001
From: Ward Poelmans <wpoely86@gmail.com>
Date: Tue, 14 Feb 2012 14:46:27 +0100
Subject: [PATCH 1/2] Set charset for mails to UTF-8

---
 notify.module |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/notify.module b/notify.module
index b9900b5..f3e5452 100644
--- a/notify.module
+++ b/notify.module
@@ -781,7 +781,7 @@ function notify_mail($key, &$message, $params) {
   global $user;
 
   $message['headers']['MIME-Version'] = '1.0';
-  $message['headers']['Content-Type'] = 'text/plain';
+  $message['headers']['Content-Type'] = 'text/plain;charset=utf-8';
 
   $message['subject'] = t('!sitename new content notification for !username', array('!username' => $user->name, '!sitename' => variable_get('site_name', 'Drupal')));
   $message['body'][] = t('Greetings !user,', array('!user' => $user->name)) . "\n\n";
-- 
1.7.7.6


From 209b616af530201f89fa866b4872f1adb2d94786 Mon Sep 17 00:00:00 2001
From: Ward Poelmans <wpoely86@gmail.com>
Date: Tue, 14 Feb 2012 14:46:40 +0100
Subject: [PATCH 2/2] Beter display of fields in the mails

---
 notify.module |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/notify.module b/notify.module
index f3e5452..a69bf8c 100644
--- a/notify.module
+++ b/notify.module
@@ -558,8 +558,11 @@ function _notify_content($node, $notify) {
 
       foreach($children as $child)
       {
-	  $txt .= drupal_render($content[$child]);
-	  $txt .= '<p> </p>'; // some space between the fields
+	  if(isset($content[$child]['#title']) && isset($content[$child][0]['#markup']))
+	  {
+	      $txt .= $content[$child]['#title'] . ': ';
+	      $txt .= $content[$child][0]['#markup'] . "\n\n";
+	  }
       }
   }
 
-- 
1.7.7.6

