You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by 32...@gmail.com on 2006/06/28 23:04:43 UTC

Issues with SendMailTransformer

Hello,

my sitemap:
<map:transformer name="sendmail" src="
org.apache.cocoon.mail.transformation.SendMailTransformer">
     <smtphost>smtp.host</smtphost>
     <smtpuser>user</smtpuser>
     <smtppassword>password</smtppassword>
  </map:transformer>
.
.
<map:match pattern="htmlarea-success-pipeline">
       <map:generate type="jx" src="forms/htmlarea_success.jx"/>
       <map:transform type="sendmail"/>
       <map:serialize type="xml"/>
     </map:match>


htmlarea_success.jx:
<?xml version="1.0" encoding="ISO-8859-1"?>
<document xmlns:email="http://apache.org/cocoon/transformation/sendmail">
  <email:sendmail>
    <email:from>cocoon@cocoon.org</email:from>
    <email:to>#{email}</email:to>
    <email:subject>#{subject}</email:subject>
    <email:body>#{data1}</email:body>
   </email:sendmail>
</document>


I changed the htmlarea example to send mails, when submitting the form. But
my result looks like that:

<document>
 <email:result>
        <email:failure to="321los@gmail.com">Invalid address</email:failure>
 </email:result>
</document>


Sending mails with the sendmail(.xsp) cocoon example works, so the error
must be somewhere else...the #{subject}, #{email}, etc. values are also
correctly submitted (I tried that with an easier example before).

Does anyone have a clue why I am getting that error (I also tried different
email addresses)?

Thanks for your help
Marco