Index: forward.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/forward/forward.module,v retrieving revision 1.91 diff -u -r1.91 forward.module --- forward.module 24 Jun 2009 14:58:29 -0000 1.91 +++ forward.module 23 Oct 2009 18:49:01 -0000 @@ -453,7 +453,7 @@ $cid = array(); if ($path == 'epostcard') { - $emailtype = 'postcard'; + $emailtype = 'epostcard'; drupal_set_title(variable_get('forward_epostcard_title', 'Send an e-Postcard')); } else { @@ -511,13 +511,13 @@ $form['message']['subject'] = array( '#type' => 'item', '#title' => t('Message Subject'), - '#value' => t(variable_get('forward_'. $emailtype .'subject', '!name has sent you a message from !site'), array('!name' => t('(Your Name)'), '!site' => variable_get('site_name', 'drupal'))), + '#value' => t(variable_get('forward_'. $emailtype .'_subject', '!name has sent you a message from !site'), array('!name' => t('(Your Name)'), '!site' => variable_get('site_name', 'drupal'))), '#description' => '', ); $form['message']['body'] = array( '#type' => 'item', '#title' => t('Message Body'), - '#value' => t(variable_get('forward_'. $emailtype .'message', '!name thought you would like to see the !site web site.'), array('!name' => t('(Your Name)'), '!site' => variable_get('site_name', 'drupal'))), + '#value' => t(variable_get('forward_'. $emailtype .'_message', '!name thought you would like to see the !site web site.'), array('!name' => t('(Your Name)'), '!site' => variable_get('site_name', 'drupal'))), '#description' => '', ); if (variable_get('forward_allow_message', TRUE)) { @@ -638,7 +638,7 @@ global $base_url, $user; $dynamic_content = ""; // Prepare the sender: - $from = $form_state['values']['yemail']; + $from = trim($form_state['values']['yname'] .' <'. $form_state['values']['yemail'].'>'); // Compose the body: // Note how the form values are accessed the same way they were accessed in the validate function @@ -758,7 +758,7 @@ } $params['subject'] = t(variable_get('forward_'. $emailtype .'_subject', '!name has sent you a message from !site'), array('!name' => $form_state['values']['yname'], '!site' => variable_get('site_name', 'drupal'))); - $params['from'] = (variable_get('forward_sender_address', '') != '') ? variable_get('forward_sender_address', '') : $form_state['values']['yemail']; + $params['from'] = (variable_get('forward_sender_address', '') != '') ? variable_get('forward_sender_address', '') : $from; $recipients = trim($form_state['values']['recipients']); $recipients = str_replace(array("\r\n", "\n", "\r"), ',', $recipients);