Forums de discussion

Using MailEngine.send() in Pluggins [resolved]

thumbnail
Puj Z, modifié il y a 13 années.

Using MailEngine.send() in Pluggins [resolved]

Regular Member Publications: 220 Date d'inscription: 14/01/10 Publications récentes
Hi,

I am trying to send emails within an action method of a pluggin and when I try to use
MailEngine.send(from, to, subject, body);

I get this error when trying to deploy the plugin:
java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableException

the method was working fine in a struts portlet, but now that I am using a normal portlet (because of some nasty bugs of struts with lp6.0 on debian), I get this exception.

Does anyone have any ideas why this happens?
Is there any other method to send emails (with attachments) within a portlet?

Any help would be appreciated!
thumbnail
Peter Shin, modifié il y a 13 années.

RE: Using MailEngine.send() in Pluggins

Regular Member Publications: 121 Date d'inscription: 24/09/07 Publications récentes
hey Puj, it looks like the portlet is missing the commons-lang.jar.

Add this line to the portlet's liferay-plugin-package.properties file

portal-dependency-jars=\
    commons-lang.jar
thumbnail
Puj Z, modifié il y a 13 années.

RE: Using MailEngine.send() in Pluggins [resolved]

Regular Member Publications: 220 Date d'inscription: 14/01/10 Publications récentes
Thanks Peter!

It works now! emoticon

Cheers