Edgewall Software

Ticket #448: trac-r599-smtp_from.patch

File trac-r599-smtp_from.patch, 1.6 KB (added by mrowe@…, 5 years ago)

Patch that implements suggested solution. The modification to templates/ticket_notify_email.cs is to prevent the last line of the notification email from being run in to automatically appended email footers.

  • trac/Notify.py

     
    114114                                               'smtp_server', 
    115115                                               self.smtp_server) 
    116116        self.from_email = self.env.get_config('notification', 
    117                                               'smtp_replyto', 
     117                                              'smtp_from', 
    118118                                              self.from_email) 
     119        self.replyto_email = self.env.get_config('notification', 
     120                                                 'smtp_replyto', 
     121                                                 self.from_email) 
    119122        Notify.notify(self, resid) 
    120123                  
    121124    def get_email_addresses(self, txt): 
     
    138141        msg['X-URL'] =  self.env.get_config('project','url') 
    139142        msg['Subject'] = Header(self.subject, 'utf-8') 
    140143        msg['From'] = '%s <%s>' % (projname, self.from_email) 
    141         msg['Sender'] = msg['Reply-To'] = self.from_email 
     144        msg['Sender'] = self.from_email 
     145        msg['Reply-To'] = self.replyto_email 
    142146        msg['To'] = rcpt 
    143147        for hdr in mime_headers.keys(): 
    144148            msg[hdr] = mime_headers[hdr] 
  • templates/ticket_notify_email.cs

     
    1818/if ?> 
    1919--  
    2020Ticket URL: <<?cs var:$ticket.link ?>> 
    21 <?cs var:$project.name ?> <<?cs var:$trac.href.homepage ?>> 
    22  No newline at end of file 
     21<?cs var:$project.name ?> <<?cs var:$trac.href.homepage ?>>