[Oi-commits] r1340 - in trunk: . forum
oi-commits at pardus.org.tr
oi-commits at pardus.org.tr
Tue May 6 17:51:49 EEST 2008
Author: erenturkay
Date: Tue May 6 17:51:49 2008
New Revision: 1340
Modified:
trunk/forum/views.py
trunk/settings.py
Log:
send e-mail to list
Modified: trunk/forum/views.py
=================================================================
--- trunk/forum/views.py (original)
+++ trunk/forum/views.py Tue May 6 17:51:49 2008
@@ -25,7 +25,7 @@
# import our function for sending e-mails and setting
from oi.st.wrappers import send_mail_with_header
-from oi.settings import FORUM_FROM_EMAIL, WEB_URL
+from oi.settings import FORUM_FROM_EMAIL, WEB_URL, FORUM_MESSAGE_LIST
# import bbcode renderer for quotation
from oi.forum.postmarkup import render_bbcode
@@ -221,6 +221,16 @@
fail_silently = True
)
+ # send mailing list also.
+ send_mail_with_header('Re: %s' % topic.title,
+ '%s\n%s<br /><br /><a href="%s">%s</a>' % (css, render_bbcode(form.cleaned_data['text']), 'url', 'url'),
+ '%s <%s>' % (request.user.username, FORUM_FROM_EMAIL),
+ [FORUM_MESSAGE_LIST],
+ headers = {'Message-ID': post.get_email_id(),
+ 'In-Reply-To': in_reply_to},
+ fail_silently = True
+ )
+
return HttpResponseRedirect(post.get_absolute_url())
else:
if quote_id:
@@ -304,11 +314,11 @@
# generate post url
post_url = WEB_URL + topic.get_absolute_url()
- # send e-mail. We really rock, yeah!
- send_mail_with_header('[Ozgurlukicin-forum] %s' % topic.title,
- '%s<br /><br /><a href="%s">%s</a>' % (post.text, post_url, post_url),
+ # send e-mail to mailing list. We really rock, yeah!
+ send_mail_with_header('%s' % topic.title,
+ '%s<br /><br /><a href="%s">%s</a>' % (post.text, 'url', 'url'),
'%s <%s>' % (request.user.username, FORUM_FROM_EMAIL),
- FORUM_TO_EMAIL,
+ [FORUM_MESSAGE_LIST],
headers = {'Message-ID': topic.get_email_id()},
fail_silently = True
)
Modified: trunk/settings.py
=================================================================
--- trunk/settings.py (original)
+++ trunk/settings.py Tue May 6 17:51:49 2008
@@ -27,6 +27,7 @@
# Email
DEFAULT_FROM_EMAIL = 'noreply at ozgurlukicin.com'
FORUM_FROM_EMAIL = 'forum at ozgurlukicin.com'
+FORUM_MESSAGE_LIST = 'forum at liste.ozgurlukicin.com'
#EMAIL_USE_TLS = True
# Pagination
More information about the Oi-commits
mailing list