Hi All,

I am trying to create a CRM with Joget workflow. But I encounter 2 questions when implements an email function. The requirement is: we need to send messages regularly to our customers. The email addresses are stored in a table, and the message content will change everytime.

So, I have below questions:

1. how to retrieve email address from table and then set them as recepients (we may need cycles for send to many customer);

2. how to set the message content as the form content that user input?

Thanks for your help!

  • No labels

1 Comment

  1. 1. One way you might be able to do this would be to have a beanshell Tool Activity in your flow prior to the Email Tool Activity. Within the Beanshell Tool, you'll have to write a little code to pull that email data from your custom email database. Then set a workflow variable with all of the email addresses you want to send to (I believe you separate them by a comma (,) or semi-colon (;)). Finally in your Email Tool activity, you use that workflow variable (via a Hash Variable) (with all of the email addresses) in the send to box. (#variable.my_workflow_variable_with_the_email_addresses#)

    2. If your form that you get the message content from is within the workflow process, associate it with a workflow variable in the Form. Then in the Email Tool, in your message content, just set the message body to the workflow variable using a Hash variable. (#variable.my_workflow_variable_with_the_email_body#)