Great work Henri, i also would like to get my hands on that......
Being this a drop in jar and all i think that it would fit nicely in the
[EMAIL PROTECTED] project. You should probably ask Howard, that leads
that project about that.
Cheers
Hugo
Henri Dupre wrote:
I finished packaging my email service into a nice jar file... You just
drop
it in the classpath and then you can inject the email service in any
page.
The API is:
public abstract void sendEmail(Map<EmailField,String> properties, String
pageName, Object[] parameters, boolean html);
public abstract void sendEmail(Map<EmailField,String> properties, IPage
page, Object[] parameters, boolean html);
public abstract void sendEmail(Map<EmailField,String> properties, String
content, boolean html);
The page emailed can be external and you can pass parameters to it. The
service doesn't interfere with the current rendering.
Here is a small example:
@InjectObject("service:actualis.tapestry.email.EmailEngine")
public abstract EmailEngine getEmailEngine();
public void emailConfig() {
Map<EmailField,String> emailProps = new HashMap<EmailField,String>();
emailProps.put(EmailField.SUBJECT,"Votre devis");
emailProps.put(EmailField.FROM, "[EMAIL PROTECTED]");
emailProps.put(EmailField.TO, getEmailClient());
getEmailEngine().sendEmail(emailProps, "EmailConfigurationTxt", new
Object[] { getConfiguration() }, false);
}
If anyone is interested I can send my stuff... I wouldn't mind
contributing
my component to a tapestry component repository but I did not find any
information on how to contribute.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]