[Zope-CMF] How to construct message text for Mailhost
John_Knutson@candle.com
John_Knutson@candle.com
Fri, 9 Aug 2002 17:47:20 +0100
How can I consistently construct message text for mailhost? Sometimes I can
get it to work if I'm just sending a basic text string, but if I want to
send something like a URL that I receive from another function it doesn't
work. For example, the following fragment shows the URL in the subject but
the body is empty.
url = '%s/%s' % (context.absolute_url(), context.getTypeInfo
().getActionById('view',''))
text = str (url)
subject = text
context.MailHost.send (text , mto=address, mfrom="cassini@candle.com",
subject=subject, encode="base64")
On the other hand, this works fine:
name = member.getUserName( )
text = str(name)
subject = text
context.MailHost.send (text , mto=address, mfrom="cassini@candle.com",
subject=subject, encode="base64")
I'm obviously missing some basic understanding, here. Any ideas about this
one?
John Knutson
Candle Corporation