--- subscriptions/subscriptions.module	Thu Nov 30 16:08:55 2006
+++ subscriptions/subscriptions.module	Thu Nov 30 17:26:43 2006
@@ -353,8 +353,8 @@
 /*
  * Formats the mail and sends it.
  */
-function subscriptions_sendmail($name, $to, $subject, $body, $headers) {
-  $mail_success = drupal_mail('subscriptions-sendmail',$to, $subject, $body, $headers);
+function subscriptions_sendmail($name, $to, $subject, $body, $from, $headers) {
+  $mail_success = drupal_mail('subscriptions-sendmail',$to, $subject, $body, $from, $headers);
   if ($mail_success) {
     if(variable_get('subscriptions_watchgood', 1) == 1){
       watchdog('regular', t('subscription notification for ') .'"'. $name .'" &lt;'. $to .'&gt;');
@@ -439,18 +439,23 @@
       if (function_exists('locale') && $languages[$subscriptions->language]) {
         $locale = $subscriptions->language;
       }
-      $headers = "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from";
-      $subject = t('[%site] %type subscription update for %name : %subject', array('%site' => variable_get('site_name', 'drupal'), '%type' => $strtype, '%name' => $subscriptions->name, '%subject' => $subj));
-      $body = t("Greetings, %name.\n\nA %type to which you have subscribed has been updated.\n%title\n%teaser\nTo view the thread, navigate to %url \n\n--\nThis is an automatic message from %site.\nTo manage your subscriptions, browse to %manage-url",
-      array('%name' => $subscriptions->name,
-			'%type' => t($strtype),
-      '%url' => url('node/'. $nid, NULL, $cid, 1),
-      '%site' => t(variable_get('site_name', 'drupal')),
-      '%manage-url' => url('subscriptions', NULL, NULL, 1),
-      '%title' => $nobj->title, '%teaser'=> $teaser));
+      $from = variable_get('site_mail', ini_get('sendmail_from'));
+      $headers['X-Mailer'] = 'Drupal';
+      $subject = t('Subscription update for !name at !site: !subject', array('!site' => variable_get('site_name', 'drupal'), '!name' => $subscriptions->name, '!subject' => $subj));
+      $body = t("!name,\n\nA !type to which you have subscribed has been updated.\n\n!title\n!teaser\n\nTo view the thread, navigate to !url\n\n\n--\n\nThis is an automatic message from !site.\nTo manage your subscriptions, browse to !manage-url",
+        array(
+          '!name' => $subscriptions->name,
+          '!type' => t($strtype),
+          '!url' => url('node/'. $nid, NULL, $cid, 1),
+          '!site' => t(variable_get('site_name', 'drupal')),
+          '!manage-url' => url('subscriptions', NULL, NULL, 1),
+          '!title' => $nobj->title,
+          '!teaser'=> $teaser
+        )
+      );
       // revert to original locale
       $locale = $initial_locale;
-      subscriptions_sendmail($subscriptions->name, $subscriptions->mail, $subject, $body, $headers);
+      subscriptions_sendmail($subscriptions->name, $subscriptions->mail, $subject, $body, $from, $headers);
     }
   }
   return $strsent;
@@ -721,7 +726,7 @@
           'title' => t('unsubscribe post'),
           'href' => "subscriptions/del/node/$node->nid",
           'attributes' => array(
-            'title' => t('Stop receiving an e-mail whenever a new comment is posted to this %n.', array('%n' => $node->type)),
+            'title' => t('Stop receiving an e-mail whenever a new comment is posted to this !n.', array('!n' => $node->type)),
             ),
         );
       }
@@ -729,7 +734,7 @@
   	    $links['subscriptions_add_node'] = array(
         'title' => t('subscribe post'),
         'href' => "subscriptions/add/node/$node->nid",
-        'attributes' => array('title' => t('Receive an e-mail whenever a comment is posted to this %n.', array('%n' => $name)))
+        'attributes' => array('title' => t('Receive an e-mail whenever a comment is posted to this !n.', array('!n' => $name)))
         );
       }
     }
@@ -1231,7 +1236,7 @@
       $message .= theme('xml_icon', url("subscriptions/feed"));
       drupal_add_link(array('rel' => 'alternate',
                           'type' => 'application/rss+xml',
-                          'title' => t("%name Subscriptions", array('%name' => $user->name)),
+                          'title' => t("!name Subscriptions", array('!name' => $user->name)),
                           'href' => url('subscriptions/feed')));
       return $message;
       break;
@@ -1269,7 +1274,7 @@
   }
   $sql .= " GROUP BY n.nid ORDER BY MAX(n.created) DESC";
   $result = db_query_range(db_rewrite_sql($sql), 0, variable_get('feed_default_items', 10));
-  $channel['title'] = t("%name Subscriptions", array('%name' => $account->name));
+  $channel['title'] = t("!name Subscriptions", array('!name' => $account->name));
   $channel['link'] = url("subscriptions/feed", NULL, NULL, TRUE);
   // $channel['description'] = ;
   node_feed($result, $channel);
