[opencms-dev] Error on CmsHtmlMail

Francis francis.fraikin at spw.wallonie.be
Wed Oct 6 09:21:36 CEST 2010


  Always in error.

I check the mail lib in WEB-INf

I also change mail.jar in JBoss to  mail-1.4.1.jar

Resart of Apache, JBoss and OpenCms after empty cache

You can see here the code with problem

public void sendMail (CmsObject cms, String from, String to, String 
subject, String content) throws Exception {

//		new CmsMail(cms, from, new String[]{to}, subject, content, "text/html").run();
		ArrayList toList = new ArrayList();
		toList.add(new InternetAddress(to));
		CmsHtmlMail mail = new CmsHtmlMail();
		mail.setFrom(from);
		mail.setTo(toList);
		mail.setSubject(subject);
		mail.setHtmlMsg(content);
		mail.send();
	}

org.opencms.mail.CmsHtmlMailclass inherits the method "send ()" of class  org.apache.commons.mail.Email

wich was in WEB-INF/lib/commons-email-1.0-mod.jar

and now in WEB-INF/lib/commons-email-1.1.jar

the method"send ()" is always inorg.apache.commons.mail.Email

How to solve this problem?


Le 24/09/2010 11:51, Polina Smagina a écrit :
>    Hello,
>
> check if there is the following lib file in the /WEB-INF/lib/ folder of
> the OpenCms:
>
>       mail-1.4.1.jar
>
> and  remove:
>
>       mail.jar
>
> if it is still in the lib folder.
>
> Be sure to restart tomcat.
>

-- 
Francis FRAIKIN
CIL SPW DG01-60      Tel : +32-4-2316401
Rue Côte d'Or 253    Fax : +32-4-2316464
B-4000  LIEGE        E-mail : francis.fraikin at spw.wallonie.be
BELGIUM






More information about the opencms-dev mailing list