Issue Details (XML | Word | Printable)

Key: JAMES-662
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Norman Maurer
Reporter: Stephan Sann
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JAMES Server

sendmail.py doesn't handle multiple TO-recipients

Created: 16/Oct/06 01:48 PM   Updated: 21/Nov/07 08:31 AM
Return to search
Component/s: None
Affects Version/s: 2.3.0
Fix Version/s: 2.3.1

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works sendmail.py.works4me 2006-10-17 09:24 AM Stephan Sann 4 kB
Environment: Debial Linux, Python 2.3.5, "Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)"

Resolution Date: 15/Jan/07 08:15 AM


 Description  « Hide
I got a problem with the sendmail.py-script from the /bin-directory:

Wenn I try to send a mail to two TO-recipients from a PHP-Script, only
the first one will be delivered :-(

<?PHP mail("stephan@one.de,stephan@two.de", "hallo", "moep", "From: stephan@three.de", "-fstephan@three.de"); ?>

(yes, sendmail-option "-t" is set: phpinfo() -> "sendmail_path: /usr/sbin/sendmail -t")

I'm no Python-guy, but this doesn't look like there's a extraction of multiple (comma-seperated) recipients:

[...]
        if header.startswith("To:"):
            if extract:
                to = header[3:]
                to_addrs.append(to[("<" + to).rfind("<"):(to + ">").find(">")])
[...]


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Noel J. Bergman added a comment - 16/Oct/06 08:19 PM
Correct. The code does not attempt to parse an address-list, just a single address, from the To: header. Contributions welcomed.

Stephan Sann added a comment - 17/Oct/06 09:24 AM
Well, here you are. I modified the script to work with multiple recipients, too.

Stefano Bagnara added a comment - 24/Oct/06 03:47 PM
Assigning to Trunk so we don't forget this.

Norman Maurer added a comment - 12/Jan/07 11:26 AM
I think this should be fixed in 2.3.1 too

Danny Angus added a comment - 21/Nov/07 08:31 AM
Closing issue fixed in released version.