diff --git a/mailsystem.theme.inc b/mailsystem.theme.inc
index 8a22b91..7ad2463 100644
--- a/mailsystem.theme.inc
+++ b/mailsystem.theme.inc
@@ -42,9 +42,15 @@ function mailsystem_theme_theme_registry_alter(&$theme_registry) {
 
         // Include template files to let _theme_load_registry add preprocess
         // functions.
-        include_once(drupal_get_path('theme', $theme->name) . '/template.php');
+        $templatepath = drupal_get_path('theme', $theme->name) . '/template.php';
+        if (is_readable($templatepath)) {
+        	include_once($templatepath);
+        }
         foreach ($base_theme as $base) {
-          include_once(drupal_get_path('theme', $base->name) . '/template.php');
+          $templatepath = drupal_get_path('theme', $base->name) . '/template.php';
+          if (is_readable($templatepath)) {
+            include_once($templatepath);
+          }
         }
 
         // Get the theme_registry cache.
