Whoops...!!! Spotted a few typos. Lets try again...

Here's some example code that works for me...

           VelocityEmail ve = new VelocityEmail(context);

            ve.setTo(to, addr);
            ve.setFrom("Fred Bloggs","[EMAIL PROTECTED]");
            ve.setSubject("Pointless email");
            ve.setTemplate("/email/some_message.vm");
            ve.setWordWrap(72);
            ve.send();

Important thing I found out is the the template path is below the "screens" template dir, i.e. in the above example the real filepath is /TDK_HOME/webapps/app/templates/app/email/some_message.vm

For the template itself, it's just like any other Velocity screen template (only no need to define navigations or layouts).

Hope this helps!!!!

Regards,

Matt

Bernardo Juan Marcellin Leautaud wrote:

Hi,
I'm working in a project where we are including e-mail functionality.
While trying to set the template for the VelocityEmail, I'm getting a
ReferenceException. Does anyone know how should that template to be
create or what does it need to contain?

If anyone has a complete example for the e-mail functionality (including
vm's, screens, and actions), that would help a lot.

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
   ____  | Matthew J. Forder         | Data Center Supervisor
  / / () | Seagate Techology         | Tel:+31 20 316 7468
  \ \ \  | Koolhovenlaan 1           | Fax:+31 20 653 5537
 ()_/_/  | 1119 NB Schiphol-Rijk, NL | [EMAIL PROTECTED]
 
begin:vcard 
n:Forder;Matthew
tel;cell:+31 65 350 8743
tel;fax:+31 20 653 5537
tel;work:+31 20 316 7468
x-mozilla-html:TRUE
url:http://www.seagate.com/
org:<i>Seagate Technology LLC</i>;<a href="http://www.seagate.com/";><img src="http://www.seagate.com/images/doors/frontdoor/logo.gif"; width=99 height=24 border=0 vspace=3 alt="Seagate" align=right></a>
adr:;;Koolhovenlaan 1;Schiphol-Rijk;North Holland;1119 NB;Netherlands
version:2.1
email;internet:[EMAIL PROTECTED]
title:<b>Datacenter Supervisor</b>
x-mozilla-cpt:;-25048
fn:Matthew Forder
end:vcard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to