summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@gentoo.org>2006-09-21 12:24:27 +0000
committerGunnar Wrobel <wrobel@gentoo.org>2006-09-21 12:24:27 +0000
commit325063c718099c41794fc6235aad29f578298824 (patch)
treeceb00e0985c7b13325707ff6e89c1154abea7e71 /www-apps
parentAdapted kolab backup script to recent changes in the pardus library (version ... (diff)
downloadoverlay-325063c718099c41794fc6235aad29f578298824.tar.gz
overlay-325063c718099c41794fc6235aad29f578298824.tar.bz2
overlay-325063c718099c41794fc6235aad29f578298824.zip
Bad fix for an encoding problem with the comment mailback
svn path=/stable/; revision=764
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/pyblosxom-plugins/Manifest8
-rw-r--r--www-apps/pyblosxom-plugins/files/comments.py50
2 files changed, 29 insertions, 29 deletions
diff --git a/www-apps/pyblosxom-plugins/Manifest b/www-apps/pyblosxom-plugins/Manifest
index 2ad3d60..8a28a91 100644
--- a/www-apps/pyblosxom-plugins/Manifest
+++ b/www-apps/pyblosxom-plugins/Manifest
@@ -6,10 +6,10 @@ AUX commentAPI.py 5425 RMD160 9248f1589cecb46f98fdee67496497421c0b1758 SHA1 ef65
MD5 d4a9d94b9c5eff48ee20510177e22730 files/commentAPI.py 5425
RMD160 9248f1589cecb46f98fdee67496497421c0b1758 files/commentAPI.py 5425
SHA256 74034d87f0283c9e51c56f8fae0cbb19c8a46727adad191870bf895dd3b89367 files/commentAPI.py 5425
-AUX comments.py 27997 RMD160 550beff74a9b3ffeb69c24e03101cdb870d8bf13 SHA1 30f1ed4f86b12d8c56c9c6941bf6df08d380cbec SHA256 7538219d1a3375f9b060a5143c12ab256a5fc538b8547b5b326a15a73448085d
-MD5 a0042cd68bff64caae88389166341405 files/comments.py 27997
-RMD160 550beff74a9b3ffeb69c24e03101cdb870d8bf13 files/comments.py 27997
-SHA256 7538219d1a3375f9b060a5143c12ab256a5fc538b8547b5b326a15a73448085d files/comments.py 27997
+AUX comments.py 27982 RMD160 71a3af4448f35b73adc9c6839f4587263d2765ed SHA1 c2c0baaf30a945da8d18dc22014746372bc64677 SHA256 e6b1173729896906eb9aac57dfcee863c32ec06d91b7ba6671a686180a2b282d
+MD5 5f0662f8f0acc7f0e58c57389b96c2a0 files/comments.py 27982
+RMD160 71a3af4448f35b73adc9c6839f4587263d2765ed files/comments.py 27982
+SHA256 e6b1173729896906eb9aac57dfcee863c32ec06d91b7ba6671a686180a2b282d files/comments.py 27982
AUX contact.py 11834 RMD160 ddf0da7cea376f175091b6072acae4c63a6e7a5d SHA1 cd40f330b3f9ce6f811e9f409b811e5daa7ef8a3 SHA256 12591992a3662fc61fbeb886adf4500f56d6ba44ce6eed6a8b1359f89fb924c4
MD5 12b115b48cbdaaa658b9f01d3832aab1 files/contact.py 11834
RMD160 ddf0da7cea376f175091b6072acae4c63a6e7a5d files/contact.py 11834
diff --git a/www-apps/pyblosxom-plugins/files/comments.py b/www-apps/pyblosxom-plugins/files/comments.py
index 3632d70..6273d30 100644
--- a/www-apps/pyblosxom-plugins/files/comments.py
+++ b/www-apps/pyblosxom-plugins/files/comments.py
@@ -460,33 +460,33 @@ def send_email(config, entry, comment, comment_dir, comment_filename):
email = config['comment_smtp_from']
try:
- server = smtplib.SMTP(config['comment_smtp_server'])
- curl = config['base_url']+'/'+entry['file_path']
- comment_dir = os.path.join(config['comment_dir'], entry['absolute_path'])
-
- message = []
- message.append("From: %s" % email)
- message.append("To: %s" % config["comment_smtp_to"])
- message.append("Date: %s" % formatdate(float(comment['pubDate'])))
- message.append("Subject: comment by %s" % author)
- message.append("")
- message.append("Name: %s" % author)
- if comment.has_key('email'):
- message.append("Email: %s" % comment['email'])
- if comment.has_key('link'):
- message.append("URL: %s" % comment['link'])
- try:
- message.append("Hostname: %s (%s)" % (gethostbyaddr(ipaddress)[0], ipaddress))
- except:
- message.append("IP: %s" % ipaddress)
- message.append("Entry URL: %s" % curl)
- message.append("Comment location: %s" % comment_filename)
- message.append("\n\n%s" % description)
- server.sendmail(from_addr=email,
+ server = smtplib.SMTP(config['comment_smtp_server'])
+ curl = config['base_url']+'/'+entry['file_path']
+ comment_dir = os.path.join(config['comment_dir'], entry['absolute_path'])
+ message = []
+ message.append("From: %s" % email)
+ message.append("To: %s" % config["comment_smtp_to"])
+ message.append("Date: %s" % formatdate(float(comment['pubDate'])))
+ message.append("Subject: comment by %s" % author.decode('utf-8'))
+ message.append("")
+ message.append("Name: %s" % author.decode('utf-8'))
+ if comment.has_key('email'):
+ message.append("Email: %s" % comment['email'].decode('utf-8'))
+ if comment.has_key('link'):
+ message.append("URL: %s" % comment['link'].decode('utf-8'))
+ try:
+ message.append("Hostname: %s (%s)" % (gethostbyaddr(ipaddress)[0], ipaddress))
+ except:
+ message.append("IP: %s" % ipaddress)
+ message.append("Entry URL: %s" % curl.decode('utf-8'))
+ message.append("Comment location: %s" % comment_filename.decode('utf-8'))
+ message.append("\n\n%s" % description.decode('utf-8'))
+ server.sendmail(from_addr=email,
to_addrs=config['comment_smtp_to'],
- msg="\n".join(message))
- server.quit()
+ msg="\n".join(message).encode('ascii', 'ignore'))
+ server.quit()
except Exception, e:
+ raise e
logger = tools.getLogger()
logger.error("error sending email: %s" % e)