Mercurial > kallithea
diff rhodecode/lib/smtp_mailer.py @ 1417:5875955def39 beta
fixes #223 improve password reset form
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 04 Jul 2011 10:59:01 +0200 |
parents | c1516b35f91d |
children | bf263968da47 2afe9320d5e6 |
line wrap: on
line diff
--- a/rhodecode/lib/smtp_mailer.py Sat Jul 02 19:16:39 2011 +0200 +++ b/rhodecode/lib/smtp_mailer.py Mon Jul 04 10:59:01 2011 +0200 @@ -74,13 +74,19 @@ date_ = formatdate(localtime=True) msg = MIMEMultipart() + msg.set_type('multipart/alternative') + msg.preamble = 'You will not see this in a MIME-aware mail reader.\n' + + text_msg = MIMEText(body) + text_msg.set_type('text/plain') + text_msg.set_param('charset', 'UTF-8') + msg['From'] = self.mail_from msg['To'] = ','.join(recipients) msg['Date'] = date_ msg['Subject'] = subject - msg.preamble = 'You will not see this in a MIME-aware mail reader.\n' - msg.attach(MIMEText(body)) + msg.attach(text_msg) if attachment_files: self.__atach_files(msg, attachment_files)