Project

General

Profile

Actions

Feature #17699

closed

Parse author's name enclosed in parentheses in the From field when creating a user account from an email

Feature #17699: Parse author's name enclosed in parentheses in the From field when creating a user account from an email

Added by Stanislav German-Evtushenko over 12 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Email receiving
Target version:
Resolution:

Description

Emails header "From" can be not only in angles format, like this:

From: John Doe <john.doe@company.mail>
but also in parentheses format, like this:
From: john.doe@company.mail (John Doe)
For example sendmail from postfix does this when using switch -F.
The patch to fix this is attached.


Files

Updated by Toshi MARUYAMA over 12 years ago Actions #1

  • Category set to Email receiving

Please add test.
source:trunk/test/unit/mail_handler_test.rb

Updated by Toshi MARUYAMA over 12 years ago Actions #2

  • Subject changed from Parse email with header "From" in parens format to Parse email with header "From" in parentheses format
  • Description updated (diff)

Updated by Go MAEDA almost 8 years ago Actions #4

  • Target version set to Candidate for next major release

Updated by Go MAEDA almost 8 years ago Actions #5

I wrote a new patch. The code using Mail::Address is shorter and maybe more reliable (I hope) than the code using our regular expressions.

Patches to commit:

Updated by Go MAEDA almost 8 years ago Actions #6

  • Target version changed from 4.0.2 to 4.1.0

Updated by Go MAEDA almost 8 years ago Actions #7

  • File 17699-fix-using-mail-address-object-v2.diff added

Updated the patch. email.header['from'] can be nil or Mail::UnstructuredField object (does not have addrs method).

Updated by Go MAEDA almost 8 years ago Actions #8

  • File deleted (17699-fix-using-mail-address-object-v2.diff)

Updated by Go MAEDA almost 8 years ago Actions #10

Updated the patch again. from_addr.comments also can be nil.

Updated by Go MAEDA over 7 years ago Actions #12

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch.

Updated by Go MAEDA over 7 years ago Actions #13

  • Subject changed from Parse email with header "From" in parentheses format to Parse author's name enclosed in parentheses in the From field when creating a user account from an email

Updated by Go MAEDA over 7 years ago Actions #14

  • Tracker changed from Patch to Feature
Actions

Also available in: PDF Atom