1 Reply Latest reply on Apr 9, 2009 8:17 PM by dan.j.allen

    Send mail with attachment

    allanbruno

      Well, after all my problems has been resolved, there are more.


      I just wanna to send a mail with a attachment, but the mail come to me without a attachment.
      There is me code:



      <m:message xmlns="http://www.w3.org/1999/xhtml"
          xmlns:m="http://jboss.com/products/seam/mail"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:p="http://jboss.com/products/seam/pdf" 
          xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:s="http://jboss.com/products/seam/taglib">
      
          <m:header name="X-Composed-By" value="JBoss Seam"/>
            <m:from name="Sistema GCC WEB - Cadastramento" address="allanbruno@gmail.com"/>
            <m:replyTo address="allanbruno@gmail.com"/>
            
            <m:to name="allanbruno@gmail.com">allanbruno@gmail.com</m:to>
            <m:subject>Test the Email</m:subject>
            <m:body type="plain">This is a test email
          
          CNPJ: #{fsscInscricaoContribuinte.cnpjPessoaJuridica}
        
        <m:attachment fileName="tiny.pdf">
        <p:document>                                                      
              A very tiny PDF                                                                                                
          </p:document>
        
        </m:attachment>
         
         </m:body>
         
          
          
          </m:message>
      




      And my method:




      public void send() {
               try {
                    renderer.render(/mail.xhtml);
            
                 
              }
              catch (Exception e) {
                   e.printStackTrace();


              }
           }



      PS: There no is error on send, but dont have attachment with the mail...


      Anyone?