From 99ab86bad47f4c4708434743d88ef71378d56f1a Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 23 Apr 2003 12:10:51 +0000 Subject: [PATCH] email file attachments added to issue files list (sf bug 711501) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1674 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + roundup/mailgw.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7cb8e42..d5e1ea7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -96,6 +96,7 @@ Fixed: - only look for CSV files when importing (thanks Dan Grassi) - can now unset values in CSV editing (sf bug 704788) - fixed rdbms email address lookup (case insensitivity) +- email file attachments added to issue files list (sf bug 711501) 2003-02-27 0.5.6 diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 66102eb..75dd779 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -73,7 +73,7 @@ are calling the create() method to create a new node). If an auditor raises an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.116 2003-04-17 06:51:44 richard Exp $ +$Id: mailgw.py,v 1.117 2003-04-23 12:09:20 richard Exp $ ''' import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -817,6 +817,16 @@ not find a text/plain part to use. name = "unnamed" files.append(self.db.file.create(type=mime_type, name=name, content=data, **file_props)) + # attach the files to the issue + if nodeid: + # extend the existing files list + fileprop = cl.get(nodeid, 'file') + fileprop.extend(files) + props['files'] = fileprop + else: + # pre-load the files list + props['files'] = fileprop + # # create the message if there's a message body (content) -- 2.30.2