I have write a python script to send an email to member in Zope. My problen is I can't get the body of the content. could you give me some some python code to get the body content. More over, I want to ask you how can I get the email of the current user. thank you very much.
Hello, even as I don't understand what your problem is I give you some hints: 1.) here is a script that sends mails with python script-> try: mailhost=getattr(context, context.superValues('Mail Host')[0].id) except: raise AttributeError, "cant find a Mail Host object" mMsg = 'a testful email message \n that contains a few line breaks. \n ~runyaga' mTo = 'runyaga@abc.com' mFrom = 'runyaga@xyz.com' mSubj = 'mail subject' mailhost.send(mMsg, mTo, mFrom, mSubj) You can find it on -> http://www.zopelabs.com/cookbook/991178206 To the question with the email-adress of the current user. If you use plain Zope, a user doesn't have an email-adress by default. You can surely connect email-adresses with users but this is your wown task how to do it :-) If you are using CMF or another addon I unfortunately can't help you with it.
participants (2)
-
Chy Ty -
hohage@muenster.de