I typed a long response to the original email, but my browser crashed before I could push the send button.  Here it goes again.

I recently had real problems sending mail to aol.com addresses when using the dtml-sendmail tag.  I could send to postfix, sendmail, and software.com MTAs no problem, but aol always dropped it on the floor.  When I turned on logging in my MTA (mail server), it showed the aol mailserver sending a 250 OK response to the mail sent by the mailhost, which means that AOL's server has now taken responsibility for the message.  However, the messages were never arriving.  I finally concluded that the message must have some funky defect in the headers that was causing the server to consider the message to be spam, and not deliver it.

I wouldn't be surprised if your mails were doing the same thing.

I finally resolved the problem as follows:

I stopped using a mailhost, and just use the smtphost modifier in the sendmail tag.
I had to use both the mailfrom and mailto modifiers in the sendmail tag.
I had a To and From line in my headers.  Additionally, since I was getting the To and From values from dtml variables, I had to make sure that a new line was inserted after the header

To: <dtml-if var_name><dtml-var var_name><dtml-else>default</dtml-if>
From: <dtml-if var_name><dtml-var var_name><dtml-else>default</dtml-if>
Subject: Blah

Message Body goes Here
</dtml-sendmail>

Generated this:

To: Name1 From: Name2 Subject: Blah

Message Body goes Here

I had to use the following:

To: <dtml-if var_name><dtml-var var_name>
<dtml-else>default
</dtml-if>
From: <dtml-if var_name><dtml-var var_name>
<dtml-else>default
</dtml-if>
Subject: Blah

Mesage body goes here
</dtml-sendmail>

in order to generate a message body that looks like:

To: Name1
From: Name2
Subject: Blah

Messsage body goes here

It is very important that you include a blank line after the last header, or else many mailers my reject or defer your message.
 

David Salgado wrote:

Hi Chas

>I have a client reporting that mail sent from Zope
>using a MS Exchange box as their Zope Mail Host
>never arrives.

Just tried using our Exchange server as the SMTP
server for a MailHost (which works just fine with the
other two 'real' SMTP servers I have access to, and
sure enough, the mail never arrived.

Looks like a real MS feature -- anyone else?

BTW, the Exchange server works OK as an SMTP
host from Outlook Express, which is the only
'standards-based' mail client I've got on this machine.

Cheers

             David

_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )