On Mon, 8 Dec 2003, EXT-McTaggart, Peter wrote:

> Hi,
> 
> I am using Turbine TDK 2.3  and
> org.apache.turbine.util.velocity.VelocityHtmlEmail to send emails from
> my application.
> This works very well. 
> However I would like to capture the email message (just thet body) and
> save it once it has been compiled and sent.
> 
> I've looked through the java docs and there doesn't seem to be anyway to
> get hold of the message after it has been
> processed by Velocity. I've tried to expose the getMessage() method from
> one of the commons email parent classes but it simply returns
> a null.
> 
> Can anyone suggest a way of doing this? or an alternative. I would
> rather not CC my app and have it monitor a mbox to get hold of the
> message.
> 
> Thanks
> Peter
> 

I've created a wrapper class to handle this type of situation for my email 
deliveries. Fairly easy to just extend the class adding a new getMessage() 
and setMessage() method so that it does what you want and you don't have 
to keep trying to make the email classes do things they weren't meant to 
do. 

My wrapper class just extends the basic o.a.t.u.SimpleEmail and 
SimpleHtmlEmail classes, but if you would me to send you a copy, I would 
be happy to. Should be easy to wrap for VelocityEmail as well



-- 
Regards,

Jeffery Painter

- --
[EMAIL PROTECTED]                     http://kiasoft.com
PGP FP: 9CE8 83A2 33FA 32B1 0AB1  4E62 E4CB E4DA 5913 EFBC

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
 
iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U
YNXabx7DZOV2Hd9LwSTmGpY=
=dWiu
-----END PGP SIGNATURE-----


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

Reply via email to