diff --git a/modules/checkout/commerce_checkout.rules.inc b/modules/checkout/commerce_checkout.rules.inc
index db682f7..cd2ab1c 100644
--- a/modules/checkout/commerce_checkout.rules.inc
+++ b/modules/checkout/commerce_checkout.rules.inc
@@ -31,5 +31,116 @@ function commerce_checkout_rules_event_info() {
 }
 
 /**
- * @}
+ * Implements hook_rules_action_info().
  */
+function commerce_checkout_rules_action_info() {
+  $actions = array();
+  $actions['account-mails'] = array(
+    'label' => t('Send pre-configured mail'),
+    'parameter' => array(
+    	'user' => array(
+          'type' => 'user',
+          'label' => t('User'),
+          'description' => t('User that will receive the mail.'),
+        ),
+      'mail_type' => array(
+        'type' => 'text',
+        'label' => t('Mail type'),
+        'description' => t('Select the order state whose default status the order will be updated to.'),
+        'options list' => 'commerce_checkout_rules_get_preconfigured_mails',
+      ),
+    ),
+    'group' => t('System'),
+    //'callbacks' => array(
+    //  'execute' => 'commerce_checkout_send_mail',
+    //),
+		'base' => 'commerce_checkout_send_mail',
+    'access callback' => 'rules_system_integration_access',
+  );
+
+  return $actions;
+}
+
+/**
+ * Helper function to get the preconfigured mails from user module.
+ * @see user_admin_account.
+ */
+function commerce_checkout_rules_get_preconfigured_mails($type = NULL) {
+  $preconfigured_mails = array();
+  module_load_include('inc', 'user', 'user.admin');
+  $form_mails = drupal_get_form('user_admin_settings');
+  if (is_a($type, 'RulesAction')) {
+    foreach(element_children($form_mails) as $element) {
+      if (isset($form_mails[$element]['#group']) && $form_mails[$element]['#group'] == 'email') {
+        $preconfigured_mails[$element] = $form_mails[$element]['#title'];
+      }
+    }
+  }
+  else {
+    $preconfigured_mails = $form_mails[$type];
+  }
+  return $preconfigured_mails;
+}
+
+/**
+ * Action callback to send the preconfigured mail.
+ */
+function commerce_checkout_send_mail($user, $type) {
+  if (!empty($user)) {
+    $to = str_replace(array("\r", "\n"), '', $user->mail);
+    // We get the correct template for the mail using the form array.
+    $mail_template = str_replace(array('user_mail_', '_subject', '_body'), '', reset(element_children(commerce_checkout_rules_get_preconfigured_mails($type))));
+    $message = drupal_mail('user', $mail_template, $to, language_default(), array('account' => $user));
+    if ($message['result']) {
+      watchdog('rules', 'Successfully sent email to %recipient', array('%recipient' => $to));
+    }
+  }
+}
+
+/**
+ * Implements hook_rules_condition_info().
+ */
+function commerce_checkout_rules_condition_info() {
+  $conditions = array();
+  module_load_include('inc', 'rules', 'data.rules');
+  $conditions['data_empty'] = array(
+    'label' => t('Entity exists by property'),
+    'parameter' => array(
+      'type' => array(
+        'type' => 'text',
+        'label' => t('Entity type'),
+        'options list' => 'rules_data_action_type_options',
+        'description' => t('Specifies the type of the entity that should be fetched.'),
+        'restriction' => 'input',
+       ),
+      'property' => array(
+        'type' => 'text',
+        'label' => t('Property'),
+        'description' => t('The property by which the entity is to be selected.'),
+        'restriction' => 'input',
+       ),
+      'value' => array(
+        'type' => 'unknown',
+        'label' => t('Value'),
+        'description' => t('The property value of the entity to be fetched.'),
+       ),
+    ),
+    'group' => t('Entities'),
+    'base' => 'commerce_checkout_condition_entity_exists_by_property',
+    //'access callback' => 'rules_data_action_access',
+    'callbacks' => array(
+      'form_alter' => 'rules_action_type_form_alter',
+    ),
+  );
+  return $conditions;
+}
+
+function commerce_checkout_condition_entity_exists_by_property($type, $property, $value) {
+  // This code should replaced with a call to entity_metadata_table_query when http://drupal.org/node/1041240 gets fixed.
+  $query = new EntityFieldQuery();
+  $query->entityCondition('entity_type', $type, '=')
+        ->propertyCondition($property, $value, '=')
+        ->range(0, 1);
+  $result = $query->execute();
+  return !empty($result);
+}
