Here's an example of calling that method:
// Send an account information e-mail
mailMessage.setSubject(getText("signup.email.subject"));
sendUserMessage(user, getText("newuser.email.message", args),
RequestUtil.getAppURL(getRequest()));
You will need to write up your class with some dependencies for this to work:
<property name="mailEngine" ref="mailEngine"/>
<property name="mailMessage" ref="mailMessage"/>
<property name="templateName" value="accountCreated.vm"/>
If your class is wired up automatically by Spring, the first 2 should
be set automatically, but probably not the 3rd.
Matt
On 6/22/07, Martin Ravell <[EMAIL PROTECTED]> wrote:
Can someone help me with the configuration requirements for an Action (2m5
Struts 2) so that I can send an email?
I'm assuming that I can use the sendUserMessage method in the BaseAction
class but have a strong suspicion that I need some wiring (Spring?).
I've not found any mention of this on the site. Anyone help?
Regards
Marty
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]