Changeset 576


Ignore:
Timestamp:
10/20/11 12:33:37 (12 years ago)
Author:
bas
Message:

fixed an error in parsing from addres if email name contains a charset

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r574 r576  
    1 2.4.X
     12.4.5
    22  * Allow regular expressions for recipient_list (multiple to-addresses),
    33    white_list and black_list. Each address is checked againt this regular
     
    1515    Author: Dennis McRitchie <dmcr add Princeton dot EDU >
    1616    Applied by: Bas van der Vlies
    17  
     17
     18  * Fixed an error in parsing the From address. Email address was wrong if
     19    email name contained a charset definition. There error was triggered
     20    if 'mailto_link: 1' is set. Resulting in an unicode error.
     21    Author: Bas van der Vlies
     22
    18232.4.2
    1924  * Fixed an error for text/plain attachments that are not specified as
  • trunk/debian/changelog

    r575 r576  
     1email2trac (2.4.5-1) stable; urgency=low
     2
     3  * See Changelog
     4
     5 -- Bas van der Vlies <basv@sara.nl>  Thu, 20 Oct 2011 12:28:56 +0200
     6
    17email2trac (2.4.3-2) stable; urgency=low
    28
  • trunk/email2trac.py.in

    r572 r576  
    318318        Get the default author name and email address from the message
    319319        """
     320        self.logger.debug('function get_sender_info')
    320321
    321322        to_addrs = email.Utils.getaddresses( message.get_all('to', []) )
     
    328329
    329330
    330         self.email_from = self.email_to_unicode(message['from'])
    331         self.email_name, self.email_addr  = email.Utils.parseaddr(self.email_from)
     331        self.email_name, self.email_addr  = email.Utils.parseaddr(message['from'])
     332
     333        ## decode email name can contain charset
     334        #
     335        self.email_name = self.email_to_unicode(self.email_name)
     336
     337        dstr = '\t email name: %s, email address: %s' %(self.email_name, self.email_addr) 
     338        self.logger.debug(dstr)
    332339
    333340        ## Trac can not handle author's name that contains spaces
     
    21912198        """
    21922199        self.logger.debug("function html_mailto_link")
     2200
    21932201        if not self.author:
    21942202            author = self.email_addr
  • trunk/email2trac.spec

    r570 r576  
    11Summary: Utilities for converting emails to trac tickets
    22Name: email2trac
    3 Version: 2.4.2
     3Version: 2.4.5
    44Release: 1
    55License: GPL
Note: See TracChangeset for help on using the changeset viewer.