diff --git a/sendmail/trunk/js/functions.js b/sendmail/trunk/js/functions.js
index 83352461949f16fc44ec20d0a58d2d553378663f..aa4849af807667c5703c9563dad4dcafc499ea1f 100644
--- a/sendmail/trunk/js/functions.js
+++ b/sendmail/trunk/js/functions.js
@@ -34,9 +34,13 @@ function addTemplateToEmail(templateMails, path){
                 //var strContentReplace = strContent.replace(reg, '\n') + '<p></p>';
                 var strContentReplace = strContent.replace(/\\n/g, '<p>') + '<p><p>';
                 tinyMCE.execCommand('mceInsertContent',false,strContentReplace); 
-            } else {
+            } 
+
+            /*
+            else {
                 window.top.$('main_error').innerHTML = response.error;
             }
+            */
         }
     });
 }
diff --git a/sendmail/trunk/mail_form.php b/sendmail/trunk/mail_form.php
index 615d59f25df417b63be0c72b8e986eefe2e58eec..27fe307afbe477bcebc00581cf02a1c124ce3e1c 100644
--- a/sendmail/trunk/mail_form.php
+++ b/sendmail/trunk/mail_form.php
@@ -528,6 +528,23 @@ if ($mode == 'add') {
             $content .= '</div>';
             $content .='<hr />';
 
+            $content .= '<tr>';
+            $content .= '<td><label style="padding-right:10px">' . _Label_ADD_TEMPLATE_MAIL . '</label></td>';
+            $content .= '<select name="templateMail" id="templateMail" style="width:200px" '
+                        . 'onchange="addTemplateToEmail($(\'templateMail\').value, \''
+                                    . $_SESSION['config']['businessappurl'] . 'index.php?display=true'
+                                    . '&module=templates&page=templates_ajax_content_for_mails&id=' . $_REQUEST['identifier'] . '\');">';
+
+            $content .= '<option value="">' . _ADD_TEMPLATE_MAIL . '</option>';
+            $db->connect();
+            $db->query("select template_id, template_label, template_content from templates where template_target = 'sendmail'");
+            while ( $result=$db->fetch_object()) {
+                $content .= "<option value='" . $result->template_id ."'>" . $result->template_label . "</option>";
+            }
+            $content .='</select>';
+            $content .= '</tr></br></br>';
+
+
             //Body
             if ($emailArray['isHtml'] == 'Y') {
                 $displayRaw = 'none';