I ran into this while testing #1560012: Port per-user issue notification email functionality to D7. It's minor, but annoying. If you use devel.mail.inc, you see stuff like this:

From: "admin (D7 Project)" <admin@example.com>
Date: Thu, 23 May 2013 15:23:17 -0400
...
To: admin@example.com
[Task] Yet another new title
Issue status update for:
http://localhost/d7project/node/30
Update issue:
http://localhost/d7project/node/30/edit

It should really look like this:

From: "admin (D7 Project)" <admin@example.com>
Date: Thu, 23 May 2013 15:23:17 -0400
...
To: admin@example.com
Subject: [Task] Yet another new title

Issue status update for:
http://localhost/d7project/node/30
Update issue:
http://localhost/d7project/node/30/edit

At first, I thought my email generation code was broken, but upon closer inspection, it was just how devel.mail.inc is writing this stuff to disk. :/

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Status: Active » Needs review
FileSize
589 bytes

Any objections? I can forward/back port to other branches if not.

Thanks,
-Derek

Status: Needs review » Needs work

The last submitted patch, 2002030-1.devel-mail-d7.patch, failed testing.

dww’s picture

Status: Needs work » Needs review
FileSize
939 bytes

Heh. ;) Fixed the test.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine to me. Will commit soon if nobody objects.

salvis’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/devel.mail.inc
@@ -27,7 +27,8 @@ class DevelMailLog extends DefaultMailSystem {
+    $output .= t('Subject: ') . $message['subject'] . $line_endings;
+    $output .= '-----' . $line_endings;

"Subject" is a mail header and should not be translated. And it should be followed by an empty line, not dashes.

Yes, D8 first. :-)

dww’s picture

Status: Needs work » Needs review
FileSize
1.01 KB
1.19 KB

Patches for D8 and D7 that fix #5.

dww’s picture

p.s. D6 does this only via watchdog, and the bug isn't present there since there's actually a "Subject:" in the resulting log message.

dww’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

Let's see #6 against D8.

dww’s picture

#6: 2002030-6.devel-mail-d8.patch queued for re-testing.

dww’s picture

Status: Needs review » Reviewed & tested by the community

Now can I commit these? ;)

Thanks,
-Derek

moshe weitzman’s picture

Looks good. Go ahead.

dww’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.