Hello People,
I am trying to translate the script below from velocity to groovy, but I am not getting
success in the "map" variable translation, when I try to define more than 1
value in variable I get error. I will need it because I am passing information to a
template email.
Velocity
#set($map= {'document':"$xwiki.getDocument()",
'url':"xwiki.getDocument().getExternalURL()"})
#set($discard = $xwiki.mailsender.sendMessageFromTemplate($defaultMail,
"$recipients", $xwiki.null, $xwiki.null, "pt_BR",
"PublicationWorkflow.MailTemplate : Refus de publication", $map))
My groovy
def map = xwiki.null
def result =
xwiki.mailsender.sendMessageFromTemplate("${sender}",
"danilo.oliveira(a)energisa.com.br"m.br", emailcc, emailbcc, "pt_BR",
"MailTemplate : Aviso de Publicacao Topico", map)
It will be part of a script to advice the wiki users that a topic was created in their
forum.
Anyone can help?
Thank you!
Grupo Energisa
Danilo A. Oliveira
Analista Suporte Aplicacao TI - DETI
e-mail: danilo.oliveira(a)energisa.com.br | tel: (32) 3429-6342
Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue
ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do
computador.
Privileged and confidential. If this message has been received by mistake, do not disclose
or copy its contents. Please notify sender and delete immediately.