james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Valenty <m...@valenty.com>
Subject Re: MailRepository.store() current user?
Date Tue, 05 Jun 2007 19:16:43 GMT


Stefano Bagnara-2 wrote:
> 
> Then the simplest thing you can do is to look at the
> ToMultiRepository.java source and change the way it works to use the
> authenticated sender instead of the local part of the recipient.
> 
I wrote a MyCompanyDelivery mailet which basically does:

String username =
mail.getAttribute(SMTP_AUTH_USER_ATTRIBUTE_NAME).toString();
MyMailRepository repository =
(MyMailRepository)server.getUserInbox(username);
repository.send(mail);	
mail.setState(Mail.GHOST);

where send() routes mail through my company's messaging system so that the
mail will be in the user's sent items.

This is what I was looking for!!! James is very cool, thank you for your
help.
-- 
View this message in context: http://www.nabble.com/MailRepository.store%28%29-current-user--tf3848358.html#a10975955
Sent from the James - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message