--- webform/webform.module	2007-03-05 18:44:51.000000000 +0100
+++ webform_modified/webform.module	2007-03-05 23:12:18.000000000 +0100
@@ -183,6 +183,37 @@ function webform_admin_settings() {
     );
   }
   
+
+    $form['email'] = array (
+    '#type' => 'fieldset',
+    '#title' => t('Default Email Values'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+
+  $form['email']['default_from_email']  = array(
+    '#type' => 'textfield',
+    '#title' => t("Emailaddres"),
+    '#default_value' => variable_get('default_from_email', variable_get(site_mail)),
+    '#description' => t('Default Senderadress. This may be the Emailaddres of the maintainer of your forms. This is also used for Reply-To, Return-Path and Errors-To.')
+  );
+
+    $form['email']['default_from_name']  = array(
+    '#type' => 'textfield',
+    '#title' => t("From Name"),
+    '#default_value' => variable_get('default_from_name', ""),
+    '#description' => t('Default Sendername which is displayed together with the Emailaddres.')
+  );
+
+  $form['email']['default_subject']  = array(
+    '#type' => 'textfield',
+    '#title' => t("Default Subject"),
+    '#default_value' => variable_get('default_subject', ""),
+    '#description' => t('Default Subject. If not other stated in the form configuration this is appended to your form title. If you have e.g. defined \'Your\' as a default subject and a form titled with \'order\' the email subject is \'Your Order\'.')
+  );
+
+
+
   $form['advanced'] = array (
     '#type' => 'fieldset',
     '#title' => t('Advanced Options'),
@@ -574,8 +607,9 @@ function webform_form(&$node, &$param) {
   );
   
   // Build arrays of possible return email addresses and email subject lines from elements on the form
-  $possible_email_from = array ('Default' => t('Default'));
-  $possible_email_subject = array ('Default' => t('Default'));
+  // Default values
+  $possible_email_from = array ('Default' => variable_get('default_from_email') . ' [' . t('Default') .']');
+  $possible_email_subject = array ('Default' => variable_get('default_subject') . ' [' . t('Default') .']');
   
   if (is_array($node->webformcomponents) && !empty ($node->webformcomponents)) {
     foreach ($node->webformcomponents as $cid => $component) {
@@ -1168,8 +1202,8 @@ function webform_client_form_submit($for
       
       // Default values:
       $headers = array();
-      $email_from_string = variable_get('site_mail', "webmail@{$_SERVER['SERVER_NAME']}");
-      $email_subject_string = t('Form submission from: ').' '.$node->title;
+      $email_from_string = variable_get('default_from_name'). ' <' . variable_get('default_from_email') . '>';
+      $email_subject_string = variable_get('default_subject').' '.$node->title;
 
       // Search for user set FROM and SUBJECT fields
       if (is_array($node->webformcomponents) && !empty ($node->webformcomponents)) {