Just to add the my method sendMessageFromTemplate is returning "-2" when I get 
error and "0" when I get success.
{{code}}
def result = xwiki.mailsender.sendMessageFromTemplate("${senderemail}", 
recipient, emailcc, emailbcc, "pt_BR", "MailTemplate : Aviso de Publicacao 
Post", map)
{{/code}}



Grupo Energisa
Danilo A. Oliveira
Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI
e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 
8452-9478

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.


-----Mensagem original-----
De: users [mailto:users-boun...@xwiki.org] Em nome de Danilo Amaral de Oliveira
Enviada em: quarta-feira, 12 de março de 2014 14:50
Para: XWiki Users
Assunto: [xwiki-users] Error on sending emails (listener)


Hello People,

I have codified a listener that are listening actions of creation and edition 
of the page, in "on event" method  I send an email to specifics users. When I 
create a page the listener works well and the email is sent, however when I 
update the page, the xwiki returns me the following error:

2014-03-12 14:43:20,841 
[http://wiki.scl.corp/bin/view/Blog/Publisher?entryName=Blog+de+Processos.Sucesso13&xredirect=%2Fbin%2Fview%2FBlog%2Bde%2BProcessos%2FSucesso13&form_token=yCvBxjkZrUDyTjtRbdrk3g]
 ERROR c.x.x.p.m.MailSenderPlugin     - No mail object found in the document 
MailTemplate : Aviso de Publicacao Post


The funny is that the same Mailtemplate and code is used for both kind of 
events.

I am using the a listener based on this one:
http://platform.xwiki.org/xwiki/bin/download/DevGuide/GroovyNotificationTutorial/groovynotifier.txt


Any idea?


Danilo


Grupo Energisa
Danilo A. Oliveira
Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI
e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 
8452-9478

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.


_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to