comparison roundup/mailgw.py @ 1620:fc9dafcb62e0

set title on issues even when the email body is empty [SF#727430]
author Richard Jones <richard@users.sourceforge.net>
date Sun, 27 Apr 2003 02:16:48 +0000
parents bc43a9677217
children 2ff95415ffb2
comparison
equal deleted inserted replaced
1619:7034b61e9d9e 1620:fc9dafcb62e0
71 set() method to add the message to the item's spool; in the second case we 71 set() method to add the message to the item's spool; in the second case we
72 are calling the create() method to create a new node). If an auditor raises 72 are calling the create() method to create a new node). If an auditor raises
73 an exception, the original message is bounced back to the sender with the 73 an exception, the original message is bounced back to the sender with the
74 explanatory message given in the exception. 74 explanatory message given in the exception.
75 75
76 $Id: mailgw.py,v 1.120 2003-04-24 20:30:37 kedder Exp $ 76 $Id: mailgw.py,v 1.121 2003-04-27 02:16:46 richard Exp $
77 ''' 77 '''
78 78
79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri 79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
80 import time, random, sys 80 import time, random, sys
81 import traceback, MimeWriter, rfc822 81 import traceback, MimeWriter, rfc822
569 does not exist. 569 does not exist.
570 570
571 Subject was: "%s" 571 Subject was: "%s"
572 '''%(nodeid, subject) 572 '''%(nodeid, subject)
573 573
574
575 # Handle the arguments specified by the email gateway command line. 574 # Handle the arguments specified by the email gateway command line.
576 # We do this by looping over the list of self.arguments looking for 575 # We do this by looping over the list of self.arguments looking for
577 # a -C to tell us what class then the -S setting string. 576 # a -C to tell us what class then the -S setting string.
578 msg_props = {} 577 msg_props = {}
579 user_props = {} 578 user_props = {}
678 # if all's well, add the recipient to the list 677 # if all's well, add the recipient to the list
679 if recipient: 678 if recipient:
680 recipients.append(recipient) 679 recipients.append(recipient)
681 680
682 # 681 #
683 # XXX extract the args NOT USED WHY -- rouilj
684 #
685 subject_args = m.group('args')
686
687 #
688 # handle the subject argument list 682 # handle the subject argument list
689 # 683 #
690 # figure what the properties of this Class are 684 # figure what the properties of this Class are
691 properties = cl.getprops() 685 properties = cl.getprops()
692 props = {} 686 props = {}
700 There were problems handling your subject line argument list: 694 There were problems handling your subject line argument list:
701 - %s 695 - %s
702 696
703 Subject was: "%s" 697 Subject was: "%s"
704 '''%(errors, subject) 698 '''%(errors, subject)
699
700
701 # set the issue title to the subject
702 if properties.has_key('title') and not issue_props.has_key('title'):
703 issue_props['title'] = title.strip()
705 704
706 # 705 #
707 # handle message-id and in-reply-to 706 # handle message-id and in-reply-to
708 # 707 #
709 messageid = message.getheader('message-id') 708 messageid = message.getheader('message-id')
874 props['messages'] = messages 873 props['messages'] = messages
875 else: 874 else:
876 # pre-load the messages list 875 # pre-load the messages list
877 props['messages'] = [message_id] 876 props['messages'] = [message_id]
878 877
879 # set the title to the subject
880 if properties.has_key('title') and not props.has_key('title'):
881 props['title'] = title
882
883 # 878 #
884 # perform the node change / create 879 # perform the node change / create
885 # 880 #
886 try: 881 try:
887 # merge the command line props defined in issue_props into 882 # merge the command line props defined in issue_props into

Roundup Issue Tracker: http://roundup-tracker.org/