diff --git a/print_mail/print_mail.inc b/print_mail/print_mail.inc
index 3fe19f1..3504ed3 100644
--- a/print_mail/print_mail.inc
+++ b/print_mail/print_mail.inc
@@ -25,7 +25,7 @@ function print_mail_form($form_state) {
 
   // Remove the printmail/ prefix
   $path_arr = explode('/', $_GET['q']);
-  unset($path_arr[0]);
+  unset($path_arr[0], $path_arr[1]);
   $path = filter_xss(implode('/', $path_arr));
   if (empty($path)) {
     // If no path was provided, let's try to generate a page for the referer
@@ -38,7 +38,7 @@ function print_mail_form($form_state) {
     }
     drupal_goto(PRINTMAIL_PATH . '/' . $path);
   }
-  elseif (ctype_digit($path_arr[1])) {
+  elseif (ctype_digit($path_arr[2])) {
     if (drupal_lookup_path('source', $path)) {
       // This is a numeric alias
       $path = drupal_get_normal_path($path);
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index 93a528b..90eea9c 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -55,7 +55,7 @@ function print_mail_theme() {
 function print_mail_menu() {
   $items = array();
 
-  $items[PRINTMAIL_PATH] = array(
+  $items[PRINTMAIL_PATH . '/nojs'] = array(
     'title' => variable_get('print_mail_text_title', 'Send page by email'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('print_mail_form'),
@@ -64,7 +64,19 @@ function print_mail_menu() {
     'type' => MENU_CALLBACK,
     'file' => 'print_mail.inc',
   );
-  $items[PRINTMAIL_PATH .'/'. PRINTMAIL_PATH] = array(
+  if (module_exists('ctools')) {
+    $items[PRINTMAIL_PATH . '/%ctools_js'] = array(
+      'title' => variable_get('print_mail_text_title', 'Send page by email'),
+      'page callback' => 'print_mail_ctools',
+      'page arguments' => array('print_mail_form'),
+      'access callback' => '_print_mail_access',
+      'access arguments' => array('access send by email'),
+      'type' => MENU_CALLBACK,
+      'file' => 'print_mail.inc',
+    );
+  }
+
+  $items[PRINTMAIL_PATH . '/nojs/' . PRINTMAIL_PATH] = array(
     'access callback' => FALSE,
   );
   $items['admin/settings/print/email'] = array(
@@ -143,7 +155,7 @@ function print_mail_link($type, $node = NULL, $teaser = FALSE) {
 
     // Show book link
     if ($allowed_type === PRINT_ALLOW_BOOK_LINK) {
-      $links['book_mail'] = array('href' => PRINTMAIL_PATH .'/book/export/html/'. $node->nid,
+      $links['book_mail'] = array('href' => PRINTMAIL_PATH .'/nojs/book/export/html/'. $node->nid,
                                  'title' => $format['text'],
                                  'attributes' => $format['attributes'],
                                  'html' => $format['html'],
@@ -166,7 +178,7 @@ function print_mail_link($type, $node = NULL, $teaser = FALSE) {
         $path = $node->nid;
       }
 
-      $links['print_mail'] = array('href' => PRINTMAIL_PATH .'/'. $path,
+      $links['print_mail'] = array('href' => PRINTMAIL_PATH . '/nojs/' . $path,
                                   'title' => $format['text'],
                                   'attributes' => $format['attributes'],
                                   'html' => $format['html'],
@@ -206,6 +218,12 @@ function print_mail_help($path, $arg) {
 function print_mail_nodeapi(&$node, $op = 'view', $teaser, $page) {
   switch ($op) {
     case 'view':
+      if (module_exists('ctools')) {
+        ctools_include('ajax');
+        ctools_include('modal');
+        ctools_modal_add_js();
+      }
+
       // Insert content corner links
       $print_mail_link_pos = variable_get('print_mail_link_pos', array(PRINT_MAIL_LINK_POS_DEFAULT => PRINT_MAIL_LINK_POS_DEFAULT));
       if (($teaser === FALSE) && !empty($print_mail_link_pos['corner']) &&
@@ -298,10 +316,10 @@ function _print_mail_access($permission) {
   $page_access = TRUE;
   $parts = explode('/', $_GET['q']);
   if ($parts[0] == PRINTMAIL_PATH) {
-    if (count($parts) > 1) {
-      unset($parts[0]);
+    if (count($parts) > 2) {
+      unset($parts[0], $parts[1]);
       $path = implode('/', $parts);
-      if (ctype_digit($parts[1])) {
+      if (ctype_digit($parts[2])) {
         if (drupal_lookup_path('source', $path)) {
           // This is a numeric alias
           $path = drupal_get_normal_path($path);
@@ -359,7 +377,7 @@ function theme_print_mail_format_link() {
 
   $img = drupal_get_path('module', 'print') .'/icons/mail_icon.gif';
   $title = t('Send this page by email.');
-  $class = strip_tags($print_mail_link_class);
+  $class = strip_tags($print_mail_link_class) . ' ctools-use-modal';
   $new_window = FALSE;
   $format = _print_format_link_aux($print_mail_show_link, $print_mail_link_text, $img);
 
@@ -414,7 +432,7 @@ function print_mail_insert_link($path = NULL, $node = NULL) {
           $path = $nid;
         }
       }
-      $path = PRINTMAIL_PATH .'/'. $path;
+      $path = PRINTMAIL_PATH .'/nojs/'. $path;
       $query = print_query_string_encode($_GET, array('q'));
       if (empty($query)) {
         $query = NULL;
@@ -646,3 +664,26 @@ function print_mail_action_submit($node, $settings) {
 
   print_mail_form_submit(NULL, $form_state);
 }
+
+/**
+ * CTools modal callback to share by email
+ *
+ * @param string $form_id
+ *   The form to render
+ *
+ * @return string
+ *   JSON string with the modal form
+ */
+function print_mail_ctools($form_id) {
+  ctools_include('modal');
+  ctools_include('ajax');
+  $form_state = array(
+    'ajax' => TRUE,
+    'title' => t('Send page by email'),
+  );
+  $commands = ctools_modal_form_wrapper($form_id, $form_state);
+  if (empty($commands)) {
+    $commands[] = ctools_modal_command_dismiss();
+  }
+  return ctools_ajax_render($commands);
+}
