10 Replies Latest reply on Jun 16, 2008 2:19 PM by kukeltje

    BCC in Mail Action

    camunda

      Hi,

      I want to add BCC support in a mail action, since I saw that requirement a couple of times.

      But normally the requirement is different to the recipient, the BCC field is often a global configuration ("send everything as BCC to mail_copy@mydomain.com").

      I wonder if I introduce a configuration property "jbpm.mail.bcc.address"? Additonally it could be also read from the XML-Configuration if present, but the property seems to be more important to me.

      What do you think?

      Cheers
      Bernd

        • 1. Re: BCC in Mail Action
          jbarrez

          I think that both should be supported. There will always be use cases for both the options.

          So, for me it would be: sent a bcc to
          - the global bcc's (if they are set)
          - the addresses in the process definition
          - addresses resolved by some custom MailResolverHandler?

          • 2. Re: BCC in Mail Action
            camunda

            Okay, so I will implement:

            - reading the property and add the list of mail addresses there to the BCC
            - read the attribute "bcc" and add addresses to the list (like the "to" attribute)
            - read the attribute "bccActors" (according to attribute actors)

            For a custom MailResolverHandler I would vote, that the people overwrite the Mail class (which is an ActionHandler) to add stuff like this. If you exchange the implementation to your own in the action mapping, it works everywhere in your jbpm and isn't hacky in my eyes...

            • 3. Re: BCC in Mail Action
              jbarrez

              Looks good for me!

              Have fun with the coding, I'll definitely take a look at it when it's done :-)

              • 4. Re: BCC in Mail Action
                camunda

                Okay, done. Implemented, added a test case, mentioned in in the docs and committed,

                Here what I put in the docs:

                17.3.2. Sending Mails to a BCC target
                
                Sometimes you want to send emails to a BCC target in addition to the normal receipient. Currently, there are two supported ways of doing that: First you can specify an bccActors or bcc attribute (according to actors and to) in the process definition.
                
                <mail to='#{initiator}' bcc='bcc@mycompany' subject='websale' text='your websale of #{quantity} #{item} was approved' />
                
                The second way is to always send an BCC Mail to some location you can configure in the central configuration (jbpm.cfg.xml) in a property:
                
                <jbpm-configuration>
                 ...
                 <string name="jbpm.mail.bcc.address" value="bcc@mycompany.com" />
                </jbpm-configuration>
                


                There you see how it should work.

                • 5. Re: BCC in Mail Action
                  koen.aers

                  You code quicker than your shadow. You wanted to make sure it made the 3.2.3 release did you? ;-)

                  Regards,
                  Koen

                  • 6. Re: BCC in Mail Action
                    camunda

                    This was one motivation ;-) The other was I had some spare time today to get some of my jBPM backlog tasks done :-)

                    • 7. Re: BCC in Mail Action
                      camunda

                      BTW: When is 3.2.3 scheduled?

                      • 8. Re: BCC in Mail Action
                        koen.aers

                        i just tagged the codebase if that gives you an idea...
                        But i can't say today because then you will hold me onto that ;-)

                        cheers,
                        koen

                        p.s. if you have a spare moment and would like to do a smoke test, please do

                        • 9. Re: BCC in Mail Action
                          tom.baeyens

                          Awsome !

                          • 10. Re: BCC in Mail Action
                            kukeltje

                            on the subject of mail:

                            - I have html mail ready (optional by configuration)
                            - Configurable task-reminders (reminders for customers need a different text and often a different url for resolving the task) then reminders for e.g. employees, or even managers.

                            What are we going to do for jPDL 4? (JSF) Templates like seam has? or stick with the current (decent enough) implementation