cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross McDonald" <Ross_McDon...@vnu.co.uk>
Subject Problem with SourceResolver, so sending html email from flowscript seems impossible at the moment
Date Wed, 19 Oct 2005 12:41:31 GMT
Hi guys, 

I am hoping you can help me out, I am trying to send an html email from 
flowscript... 

something like this... 

     resolver = cocoon.getComponent(SourceResolver.ROLE); 
     var sender = new MailMessageSender("our mail server"); 
     sender.setCharset("UTF-8"); 
     sender.setFrom(from); 
     sender.setSubject(subject); 
     //sender.setBody(body); 
     sender.setBodyFromSrc("http://www.google-evil-emporium.com"); 
     sender.setBodyFromSrcMimeType("text/html"); 
     sender.setTo(to); 
     sender.send(resolver); 

but the SourceResolver (org.apache.cocoon.environment) seems to be 
extended from org.apache.excalibur.source.SourceResolver, so in 
MailMessageSender the send method complains because the SourceResolver 
passed in is not what it is expecting.  See error mesage below: 

org.mozilla.javascript.EvaluatorException: "file:/C:/hippocms/site/editor/newsletterfrance/newsletter.js",
line 126: Can't find method 
org.apache.cocoon.mail.MailMessageSender.send(org.apache.cocoon.components.CocoonComponentManager).



cause: org.mozilla.javascript.EvaluatorException: "file:/C:/hippocms/site/editor/newsletterfrance/newsletter.js",
line 126: Can't find method 
org.apache.cocoon.mail.MailMessageSender.send(org.apache.cocoon.components.CocoonComponentManager).




I appreciate your help, 

Ross McDonald. 
Mime
View raw message