Hi:
I was wondering if CoreBlog can notify the moderator/administrator
about a posted comment in a moderated blog postings.
I looked at this thread on this issue:
http://www.mail-archive.com/[email protected]/msg00126.html
I am in Zope 2.7.6-final, python 2.3.4, linux2
and COREBlog 1.2.4
MailHost-1-3-0
I am not able to make the "Notification how-to" to work for me:
Few questions:
1. Where Do I add the Mail Host object?
I have a MailHost object with ID "Mail Host" in my site root.
I also tried to put the MailHost in:
/myplonesite/blog/methods folder
2. I added the addCommentHook and parameter "d" as per the instruction
of the howto.
3. I set the proxy roles enabled for all users (anonymous, Manager,
Member etc.)
Question here, what proxy roles should I set it to.
But when I post a comment as an anonymous user, I did not get any email
notification
that a comment was posted. There is no error msg.
Any help is appreciated.
Gautam Saha
Here is the script:
--------------------------------
try:
mailhost=getattr(context, \
context.superValues('Mail Host')[0].id)
except:
raise AttributeError, "Mail Host object cant be found."
to_addr = "[EMAIL PROTECTED]"
from_addr = "[EMAIL PROTECTED]"
mMsg = """To: %s
From: %s
Mime-Version: 1.0
Content-Type: text/plain;
Author :%s
Title :%s
URL :%s
EntryID :%s
Body :
%s""" % (to_addr , from_addr , d["author"] , d["title"] ,\
d["url"] , str(d["parent_id"]) , d["body"])
mTo = to_addr
mFrom = from_addr
mSubj = 'A comment added!'
mailhost.send(mMsg, mTo, mFrom, mSubj)
_______________________________________________
COREblog-en mailing list
[email protected]
http://postaria.com/cgi-bin/mailman/listinfo/coreblog-en
Unsubscription writing to [EMAIL PROTECTED]