Ticket #1018: trac.smtp.patch
| File trac.smtp.patch, 3.2 KB (added by misc@…, 4 years ago) |
|---|
-
wiki-default/TracIni
41 41 == [notification] == 42 42 || smtp_enabled || Enable SMTP (email) notification (true, false) || 43 43 || smtp_server || SMTP server to use for email notifications || 44 || smtp_port || Port used to contact smtp server in notication emails || 44 45 || smtp_from || Sender address to use in notification emails || 45 46 || smtp_replyto || Reply-To address to use in notification emails || 46 47 || smtp_always_cc || Email address(es) to always send notifications to || -
wiki-default/TracNotification
18 18 These are the available options for the ''[notification]'' section in trac.ini. 19 19 * '''smtp_enabled''': Enable notification. 20 20 * '''smtp_server''': SMTP server used for notification messages. 21 * '''smtp_port''': Port used to contact smtp server in notication emails. 21 22 * '''smtp_from''': Email address to use for ''Sender''-headers in notification emails. 22 23 * '''smtp_replyto''': Email address to use for ''Reply-To''-headers in notification emails. 23 24 * '''smtp_always_cc''': List of email addresses to always send notifications to. ''Typically used to post ticket changes to a dedicated mailing list.'' -
trac/db_default.py
438 438 ('mimeviewer', 'enscript_path', 'enscript'), 439 439 ('notification', 'smtp_enabled', 'false'), 440 440 ('notification', 'smtp_server', 'localhost'), 441 ('notification', 'smtp_port', '25'), 441 442 ('notification', 'smtp_user', ''), 442 443 ('notification', 'smtp_password', ''), 443 444 ('notification', 'smtp_always_cc', ''), -
trac/Notify.py
79 79 """Baseclass for notification by email.""" 80 80 81 81 smtp_server = 'localhost' 82 smtp_port = 25 82 83 from_email = 'trac+tickets@localhost' 83 84 subject = '' 84 85 server = None … … 92 93 self.smtp_server = self.env.get_config('notification', 93 94 'smtp_server', 94 95 self.smtp_server) 96 self.smtp_port = self.env.get_config('notification', 97 'smtp_port', 98 self.smtp_port) 95 99 self.from_email = self.env.get_config('notification', 96 100 'smtp_from', '') 97 101 self.replyto_email = self.env.get_config('notification', … … 117 121 return filter(lambda x: x.find('@') > -1, emails) 118 122 119 123 def begin_send(self): 120 self.server = smtplib.SMTP(self.smtp_server )124 self.server = smtplib.SMTP(self.smtp_server,self.smtp_port) 121 125 if self.user_name: 122 126 self.server.login(self.user_name, self.password) 123 127
