3 Replies Latest reply on Oct 1, 2012 5:40 AM by swiderski.maciej

    Sending Mail with attachment

    s.azambasha

      Hi,

       

      Does anybody know how to send a file(txt,pdf,xls...) as part of mail attachment.

       

      I am using JBPM 5.3 with jbpm web designer (drools-guvnor).

       

      Please suggest me any ideas....Thanks in advance.

        • 1. Re: Sending Mail with attachment
          swiderski.maciej

          As far as I can tell, attachments are not supported with default EmailWorkItemHandler, you would need to extend it or create custom implementation.

           

          HTH

          • 2. Re: Sending Mail with attachment
            s.azambasha

            Hi Maciej,

             

            Thanks for your reply.

             

            I am actually trying with custom workitemHandler with apache commons mail functionality.

             

            Modified form to display a Browse button (<input type = "file" name="FormObject"/>) on the form UI, and created a Process Variable with the name "FormObject".

            Inside WorkItem in my custom workItemHandler class I am getting "FormObject" as a string with the content of the text file uploaded.(not getting as a File object).

            (And not able to upload PDF,XLS... file formats)

             

            My requirement is to browse the file and send as an attachment to the mail.

             

            Please suggest me on this...

            • 3. Re: Sending Mail with attachment
              swiderski.maciej

              take a look at form widget in jbpm designer maybe it wil fit your requirement

               

              HTH