Sure. I have an existing messaging/crm system with a UI and I am using James
to expose pop3/smtp services. I implemented a custom MailRepository and
UsersRepository to authenticate and pull messages from my companies backend.

I am testing with a few pop3 clients, including Outlook Express, to retreive
mail (works). The smtp part is used when sending mail from a pop3 client. I
would like the mail to be logged by my messaging system so the user can see
the mail in their sent items when using the existing web UI.

For smtp, I require auth and us my custom UsersRepository (works). I am
using the ToRepository mailet to send the mail to my custom MailRepository.
This invokes the store() method as expected.

The part that is a problem is that the instance of MyMailRepository that
store is invoked on is not tied to the authenticated user from the smtp
session. It's the same instance of MyMailRepository every time and the only
way I can see to distinguish who sent the mail is by looking at
Mail.getSender(). This is a problem because I need auth info on the user.

I hope I didn't confuse you more :) Thanks for attempting to understand my
setup...


Norman Maurer-3 wrote:
> 
> Hi ,
> 
> can you ellaborate ?
> 
> I'm a bit lost atm :-/
> 
> bye
> Norman
> 
> Am Freitag, den 01.06.2007, 17:35 -0700 schrieb Michael Valenty:
>> I am trying to put a "sent item" in my messaging system
>> (MyMailRepository)
>> when sending mail from a smtp client like Outlook Express. The
>> ToRepository
>> mailet (see below) is working but I don't know how to get the user
>> credentials from the smtp session.
>> 
>> 
>> Michael Valenty wrote:
>> > 
>> > In config.xml > spoolmanager > processor(name=transport), I added:
>> > 
>> >       <mailet match="All" class="ToRepository">
>> >         <repositoryPath>ew://mail/outgoing/</repositoryPath>
>> >       </mailet>
>> > 
>> > Then, when I send mail from a Outlook to a remote recipient
>> > MyMailRepository.store() is invoked as expected. The issue is that it
>> > looks like there is only one instance of MyMailRepository for all users
>> > and I have to look at mail.getSender() to figure who it's from.
>> > 
>> > I noticed that MyMailRepository.configure is called with
>> destinationURL=
>> > ew://mail/outgoing/ and not ew://mail/outgoing/<username> like w/
>> > inboxRepository.
>> > 
>> > Also, I am requiring auth on SMTP and I would like to get the current
>> > user... Any ideas?
>> > 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/MailRepository.store%28%29-current-user--tf3848358.html#a10953965
Sent from the James - Dev mailing list archive at Nabble.com.


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

Reply via email to