cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@odoko.co.uk>
Subject Re: Problem with SourceResolver, so sending html email from flowscript seems impossible at the moment
Date Wed, 19 Oct 2005 12:59:43 GMT
Ross McDonald wrote:
> 
> 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"_
> <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).

The javadocs for MailMessageSender say that you should use
sender.send(). The method you're using has been deprecated.

Regards, Upayavira

Mime
View raw message