I tried to send notifications to email and have been successfully sent, the process I do is Vacation Request, and I'm need to send notifications when rejected or approved the request, but must be you customize notifications must carry information on what has entered the user name, dates chosen, among others. All this information is stored in my data model.
Should display in the mail something like the following:
Dear [User], your Vacation Request has been approved. Start Date [date chosen by the user] Final date [date chosen by the user]
Any idea or an example of how could, greatly appreciate your help.
In you mail connector use a script to build the body text, something like this:
- StringBuilder body = new StringBuilder();
- body.append("Dear "+myBdm.getFirstName()+",");
- return body.toString();
PS:as this answers your question, please mark as resolved.
Hi Séan, after using the script which worked well, I started has to try to create a block of impressions to make the notification in an email using line breaks, but I have not got, I researched and I have used several commands as printn, '\ n' new line, among others, both Java and Groovy and continues by printing in a single block. You know how to do this, need some library in my script? Thanks for your help, regards.
You need to make sure you check the box for HTML in the email body (it's on a page somewhere) and do not use '\ n' - because your email is now in HTML use '< /br >' (removing the spaces...