diff --git a/README.txt b/README.txt
index 40aedeb..5a18b88 100644
--- a/README.txt
+++ b/README.txt
@@ -86,9 +86,9 @@
 
   To create a custom mail template copy the mimemail-message.tpl.php file from
   the mimemail/theme directory into your default theme's folder. Both general and
-  by-mailkey theming can be performed:
+  by-id theming can be performed:
     mimemail-message.tpl.php (for all messages)
-    mimemail-message--[mailkey].tpl.php (for messages with a specific mailkey)
+    mimemail-message--[id].tpl.php (for messages with a specific identifier)
 
   Messages can be rendered using different themes. You can choose the following
   settings to render the e-mail:
diff --git a/mimemail.module b/mimemail.module
index 844dafc..4e65b43 100644
--- a/mimemail.module
+++ b/mimemail.module
@@ -425,7 +425,7 @@ function mimemail_mailengine($op, $message = array()) {
 function mimemail_prepare_message($message) {
   module_load_include('inc', 'mimemail');
 
-  $key = $message['key'];
+  $id = $message['id'];
   $to = $message['to'];
   $from = $message['from'];
   $subject = $message['subject'];
@@ -468,12 +468,12 @@ function mimemail_prepare_message($message) {
   }
 
   $subject = str_replace("\n", '', trim(drupal_html_to_text($subject)));
-  $key = str_replace('_', '-', $key);
-  $body = theme(array('mimemail_message__' . $key, 'mimemail_message'), array('key' => $key, 'recipient' => $to, 'subject' => $subject, 'body' => $body));
+  $id = str_replace('_', '-', $id);
+  $body = theme(array('mimemail_message__' . $id, 'mimemail_message'), array('id' => $id, 'recipient' => $to, 'subject' => $subject, 'body' => $body));
 
   foreach (module_implements('mail_post_process') as $module) {
     $function = $module . '_mail_post_process';
-    $function($body, $key);
+    $function($body, $id);
   }
 
   $plain = $plain || variable_get('mimemail_textonly', 0);
diff --git a/modules/mimemail_compress/mimemail_compress.module b/modules/mimemail_compress/mimemail_compress.module
index baeb22e..6d8f89c 100644
--- a/modules/mimemail_compress/mimemail_compress.module
+++ b/modules/mimemail_compress/mimemail_compress.module
@@ -8,7 +8,7 @@
 /**
  * Mimemail postprocess
  */
-function mimemail_compress_mail_post_process(&$message, $mailkey) {
+function mimemail_compress_mail_post_process(&$message, $id) {
   module_load_include('inc', 'mimemail_compress');
   // Separate CSS from HTML for processing
   $parts = mimemail_compress_clean_message($message);
diff --git a/theme/mimemail-message.tpl.php b/theme/mimemail-message.tpl.php
index 109c384..a13d8e5 100644
--- a/theme/mimemail-message.tpl.php
+++ b/theme/mimemail-message.tpl.php
@@ -5,7 +5,7 @@
  * Default theme implementation to format an HTML mail.
  *
  * Copy this file in your default theme folder to create a custom themed mail.
- * Rename it to mimemail-message--[key].tpl.php to override it for a
+ * Rename it to mimemail-message--[id].tpl.php to override it for a
  * specific mail.
  *
  * Available variables:
@@ -13,7 +13,7 @@
  * - $subject: The message subject
  * - $body: The message body
  * - $css: Internal style sheets
- * - $key: The message identifier
+ * - $id: The message identifier
  *
  * @see template_preprocess_mimemail_message()
  */
@@ -29,7 +29,7 @@
     </style>
     <?php endif; ?>
   </head>
-  <body id="mimemail-body" <?php if ($key): print 'class="'. $key .'"'; endif; ?>>
+  <body id="mimemail-body" <?php if ($id): print 'class="'. $id .'"'; endif; ?>>
     <div id="center">
       <div id="main">
         <?php print $body ?>
diff --git a/theme/mimemail.theme.inc b/theme/mimemail.theme.inc
index 15af378..963bf32 100644
--- a/theme/mimemail.theme.inc
+++ b/theme/mimemail.theme.inc
@@ -10,7 +10,7 @@ function mimemail_theme_theme() {
 
   return array(
     'mimemail_message' => array(
-      'variables' => array('key' => NULL, 'recipient' => NULL, 'subject' => NULL, 'body' => NULL),
+      'variables' => array('id' => NULL, 'recipient' => NULL, 'subject' => NULL, 'body' => NULL),
       'template' => 'mimemail-message',
       'pattern' => 'mimemail_message__',
       'file' => 'mimemail.theme.inc',
@@ -111,8 +111,8 @@ function template_preprocess_mimemail_message(&$variables) {
   // Set styles for the message.
   $variables['css'] = $css;
 
-   // Process key to be a proper CSS class.
-  $variables['key'] = str_replace('_', '-', $variables['key']);
+   // Process ID to be a proper CSS class.
+  $variables['id'] = str_replace('_', '-', $variables['id']);
 }
 
 /**
