[Zope] Re: Anyone using Zope Mail Host with MS Exchange ? (ch as)

David Salgado David@connmed.co.uk
Fri, 14 Jan 2000 17:11:01 -0000


>I just tried to get it working and failed. After looking at the code
>(lib/python/Products/MailHost/*.py), it seems that the smtphost is never
>evaluated as an expression, preventing its use in the way you are
>attempting. Bummer.
>
>A mailhost and acquisition would (I think) do what you require. However,
>the title of this thread leads me to believe this won't work with your
>particular setup (Exchange). Boo.

Well, the way I got around it was to define a method called mail_sender;

<dtml-sendmail smtphost="my.smtp.host">
To: <dtml-var mail_to>
From: <dtml-var mail_from>
Subject: <dtml-var mail_subject>

<dtml-var mail_text>
</dtml-sendmail>

...and then call it as follows;

<dtml-with "_.namespace(mail_to='david@connmed.co.uk',
                        mail_from='Zaphod X. Beeblebrox
<zaphod@hhgttg.com>',
                        mail_subject='Another Test',
                        mail_text='you\'re a hoopy frood who really knows
where his towel is.')">

<dtml-var mail_sender>

</dtml-with>

...which seems to work OK. Bit clunky though.

Thanks for taking the time to look into this for me -- much appreciated.

Cheers
         David