Hi all,
I'am trying to use SendMailTransformer, but without success...
In my sitemap I have:

<map:match pattern="envia-email">
  <map:generate src="mailtest.xml"/>
  <map:transform type="sendmail">
     <map:parameter name="subject" value="O Subject"/>
     <map:parameter name="body" value="O Body"/>
  </map:transform>
  <map:serialize type="xml"/>
</map:match>

If I do not put subject and body in sitemap an Exception is thrown,
saying that: parameter 'subject' does not have a value!! Same for body..
Adding this parameters in sitemap, the pipeline is exceuted and in the
end I got: "<html><body/></html>" and no mail is sent!!

Does anyone has already used this transformer with success?!
Thanks in advance for any help!


mailtest.xml
=============
<document
xmlns:email="http://apache.org/cocoon/transformation/sendmail";>
  <email:sendmail>
    <email:smtphost>127.0.0.1</email:smtphost>
    <email:from>[EMAIL PROTECTED]</email:from>
    <email:to>[EMAIL PROTECTED]</email:to>
    <email:subject>O Relatorio a ser envioado por email</email:subject>
    <email:body>
      Relatorio com o total das chamadas efectuadas que eu
      decidi agendar para envio por email!
    </email:body>
    <email:attachment name="report.xls" mime-type="text/html"
    src="cocoon:/excel-*-*-*-*"/>
  </email:sendmail>
</document>



-- 
Rui Alberto L. GonÃalves <[EMAIL PROTECTED]>
PT InovaÃÃo


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to