Index: modules/project/UPGRADE.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project/UPGRADE.txt,v
retrieving revision 1.3
diff -u -p -r1.3 UPGRADE.txt
--- modules/project/UPGRADE.txt	22 Aug 2007 16:29:06 -0000	1.3
+++ modules/project/UPGRADE.txt	6 Nov 2007 21:46:29 -0000
@@ -9,6 +9,23 @@ specific things you need to know about a
 
 
 --------------------------------------------------
+Upgrading to 5.x-1.1 (from 5.x-1.0)
+--------------------------------------------------
+
+  The 'Project e-mail' setting on the project edit page has been
+removed due to a number of problems.  This setting was only used for
+Project issue tracking, so it didn't belong here in any case.
+Therefore, database update #5001 drops this column from the
+{project_projects} database table where it is stored.  If you happen
+to want to save this data for some reason, you should save it into a
+separate table before you upgrade to 5.x-1.1 and run update.php.  For
+more information, please see the UPDATE.txt file in the project_issue
+directory, and read the following issues:
+- http://drupal.org/node/36619
+- http://drupal.org/node/189210
+
+
+--------------------------------------------------
 Upgrading to 5.x-1.* (from 4.7.x-*)
 --------------------------------------------------
 
Index: modules/project/project.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project/project.inc,v
retrieving revision 1.119
diff -u -p -r1.119 project.inc
--- modules/project/project.inc	6 Nov 2007 18:56:36 -0000	1.119
+++ modules/project/project.inc	6 Nov 2007 21:46:29 -0000
@@ -101,21 +101,6 @@ function project_project_form($node) {
     '#description' => t('This will be used to generate a /project/&lt;shortname&gt;/ URL for your project.'),
     '#required' => TRUE,
   );
-
-  $description = t('E-mail address where the project owner can be contacted.');
-  if (module_exists('project_issue')) {
-    $description .= ' '. t('This will be used as the From: address for issue subscription e-mails.');
-  }
-
-  $form['project']['mail'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Project e-mail'),
-    '#default_value' => isset($node->mail) ? $node->mail : $user->mail,
-    '#size' => 40,
-    '#maxlength' => 255,
-    '#description' => $description,
-    '#required' => TRUE,
-  );
   $form['project']['homepage'] = array(
     '#type' => 'textfield',
     '#title' => t('Homepage'),
@@ -219,14 +204,6 @@ function project_project_validate(&$node
     form_set_error('body', t('You must add a project description.'));
   }
 
-  // Validate email.
-  if (empty($node->mail)) {
-    form_set_error('mail', t('You must specify a project e-mail.'));
-  }
-  elseif ($data = user_validate_mail($node->mail)) {
-    form_set_error('mail', $data);
-  }
-
   // Make sure all URL fields actually contain URLs.
   $fields = array(
     'homepage' => t('Homepage'),
@@ -408,12 +385,12 @@ function project_project_nodeapi(&$node,
 }
 
 function project_project_insert($node) {
-  db_query("INSERT INTO {project_projects} (nid, uri, homepage, changelog, cvs, demo, release_directory, mail, version, screenshots, documentation, license) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s')", $node->nid, $node->uri, $node->homepage, $node->changelog, $node->cvs, $node->demo, $node->release_directory, $node->mail, $node->version, $node->screenshots, $node->documentation, $node->license);
+  db_query("INSERT INTO {project_projects} (nid, uri, homepage, changelog, cvs, demo, release_directory, version, screenshots, documentation, license) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s')", $node->nid, $node->uri, $node->homepage, $node->changelog, $node->cvs, $node->demo, $node->release_directory, $node->version, $node->screenshots, $node->documentation, $node->license);
 //  project_release_scan_directory($node->uri);
 }
 
 function project_project_update($node) {
-  db_query("UPDATE {project_projects} SET uri = '%s', homepage = '%s', changelog = '%s', cvs = '%s', demo = '%s', release_directory = '%s', mail = '%s', version = %d, screenshots = '%s', documentation = '%s', license = '%s' WHERE nid = %d", $node->uri, $node->homepage, $node->changelog, $node->cvs, $node->demo, $node->release_directory, $node->mail, $node->version, $node->screenshots, $node->documentation, $node->license, $node->nid);
+  db_query("UPDATE {project_projects} SET uri = '%s', homepage = '%s', changelog = '%s', cvs = '%s', demo = '%s', release_directory = '%s', version = %d, screenshots = '%s', documentation = '%s', license = '%s' WHERE nid = %d", $node->uri, $node->homepage, $node->changelog, $node->cvs, $node->demo, $node->release_directory, $node->version, $node->screenshots, $node->documentation, $node->license, $node->nid);
 //  project_release_scan_directory($node->uri);
 }
 
Index: modules/project/project.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project/project.install,v
retrieving revision 1.15
diff -u -p -r1.15 project.install
--- modules/project/project.install	22 Aug 2007 16:29:06 -0000	1.15
+++ modules/project/project.install	6 Nov 2007 21:46:29 -0000
@@ -15,7 +15,6 @@ function project_install() {
           demo varchar(255) NOT NULL default '',
           release_directory varchar(255) NOT NULL default '',
           version int(10) unsigned NOT NULL default '0',
-          mail varchar(255) NOT NULL default '',
           documentation varchar(255) not null default '',
           screenshots varchar(255) not null default '',
           license varchar(255) not null default '',
@@ -33,7 +32,6 @@ function project_install() {
           demo varchar(255) NOT NULL default '',
           release_directory varchar(255) NOT NULL default '',
           version int NOT NULL default '0',
-          mail varchar(255) not null default '',
           screenshots varchar(255) default '' not null,
           documentation varchar(255) default '' not null,
           license varchar(255) default '' not null,
@@ -230,3 +228,15 @@ function project_update_5000() {
   variable_del('project_support_forum');
   return array();
 }
+
+/**
+ * Get rid of the per-project mail address (used only for the issue
+ * email From: header) which has numerous problems.
+ * See http://drupal.org/node/36619 and http://drupal.org/node/189210
+ */
+function project_update_5001() {
+  $ret = array();
+  // PgSQL and MySQL have the same syntax for this.
+  $ret[] = update_sql('ALTER TABLE {project_projects} DROP COLUMN mail');
+  return $ret;
+}
Index: modules/project_issue/UPGRADE.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/UPGRADE.txt,v
retrieving revision 1.3
diff -u -p -r1.3 UPGRADE.txt
--- modules/project_issue/UPGRADE.txt	2 Nov 2007 01:47:16 -0000	1.3
+++ modules/project_issue/UPGRADE.txt	6 Nov 2007 21:46:30 -0000
@@ -18,6 +18,7 @@ at the same time.  For example, you cann
 considering upgrading a 4.7.x-1.* installation of project_issue to
 4.7.x-2.*, please consult modules/project/UPGRADE.txt.
 
+
 ------------------------------------------------------------
 Upgrading to 5.x-2.* (from the 4.7.x-2.* and 5.x-1.* series)
 ------------------------------------------------------------
@@ -56,3 +57,18 @@ Upgrading to 5.x-2.* (from the 4.7.x-2.*
     5. For the 'project_issue module' select box, select update 5200.
     6. Click on 'Update'.
 
+  NEW SETUP FOR ISSUE EMAILS
+
+  In the past, the "From" address of all project issue e-mail
+  notifications was the address entered by the project owner in the
+  "Project e-mail" field on the project's settings page. This created
+  a privacy problem, because unbeknownst to them, their e-mail address
+  was being revealed to other users subscribed to their issue queue
+  e-mails.
+
+  To correct this issue, all project issue e-mails now have a global
+  "From" address.  This defaults to the global site e-mail, but can be
+  customized using the "Reply-to address on e-mail notifications"
+  setting on the Project issue settings page
+  (admin/project/project-issue-settings).
+
Index: modules/project_issue/mail.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/mail.inc,v
retrieving revision 1.94
diff -u -p -r1.94 mail.inc
--- modules/project_issue/mail.inc	6 Nov 2007 17:24:07 -0000	1.94
+++ modules/project_issue/mail.inc	6 Nov 2007 21:46:30 -0000
@@ -248,7 +248,8 @@ function project_mail_notify($nid) {
 
   // Create mail header
   $sender->name = mime_header_encode(t('!name (!site)', array('!name' => $user->name, '!site' => variable_get('site_name', 'Drupal'))));
-  $sender->mail = $project->mail;
+  $sender->mail = strtr(variable_get('project_issue_reply_to', variable_get('site_mail', ini_get('sendmail_from'))), array('%project' => $project->uri));
+
   // The sender name is enclosed by double quotes below
   // to satisfy RFC2822 <http://www.faqs.org/rfcs/rfc2822.html>,
   // which requires double quotes when special characters (including
Index: modules/project_issue/project_issue.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/project_issue.module,v
retrieving revision 1.71
diff -u -p -r1.71 project_issue.module
--- modules/project_issue/project_issue.module	6 Nov 2007 18:56:36 -0000	1.71
+++ modules/project_issue/project_issue.module	6 Nov 2007 21:46:31 -0000
@@ -176,6 +176,12 @@ function project_issue_settings_form() {
     '#description' => t('If selected, user signatures will be appended to the display of issue followups.'),
   );
 
+  $form['project_issue_reply_to'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Reply-to address on e-mail notifications'),
+    '#default_value' => variable_get('project_issue_reply_to', variable_get('site_mail', ini_get('sendmail_from'))),
+    '#description' => t('All issue e-mails sent via subscriptions will appear from this e-mail address. You can use %project as a placeholder which will be replaced with the %short_project_name setting for the issue\'s current project.', array('%project' => '%project', '%short_project_name' => t('Short project name'))),
+  );
   if (module_exists('mailhandler')) {
     // TODO: move this stuff to mailhandler.module ?
     $items = array(t('<none>'));
@@ -183,12 +189,10 @@ function project_issue_settings_form() {
     while ($mail = db_result($result, $i++)) {
       $items[$mail] = $mail;
     }
-    $form['project_issue_reply_to'] = array(
-      '#type' => 'select',
-      '#title' => t('Reply-to address on e-mail notifications'),
-      '#default_value' => variable_get('project_reply_to', ''),
-      '#options' => $items,
-    );
+
+    // Switch reply-to to a select box instead.
+    $form['project_issue_reply_to']['#type'] = 'select';
+    $form['project_issue_reply_to']['#options'] = $items;
   }
 
   return system_settings_form($form);
