You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Disha <di...@openskysoftware.com> on 2003/03/07 18:09:46 UTC

Message_name

I am using database repository for storing mails. Every incoming mail
goes thru 2 mailets; one the LocalDelivery and another similar to it
that writes the mail to myinbox. I want to store the reference to this
mail from James inbox in myinbox. Is there a way we can get the
message_name of this mail that would be written to the inbox in the
transport processor? 
mail.getName() does not turn out to be the same when this mail passes
thru myMailet from what gets written in the inbox. They differ by the
last 4 digits. I want to be able to somehow get the message_name that
would be written in the inbox table in myMailet so I can have a
reference to the mail in both the tables.
 Any suggestions?

Thanks,
Disha
-- 
Disha <di...@openskysoftware.com>


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


RE: Message_name

Posted by "Noel J. Bergman" <no...@devtech.com>.
> > > The message_name is written according to the current system time
during
> > > the time the mail is stored.

> > The mail name is attached in SMTPHandler before the message is given to
the
> > MailServer to process.  Therefore it is present long before your mailets
> > would ever see it.

> But that mail name is different from what gets written in the
> message_name field in the inbox at time of store mail.

So I see ... seems like a waste.  Not sure why the Mailet API doesn't have a
store method for a Mail object.  Something to ask about for Mailet API v3.

Your hack seems reasonable.

	--- Noel


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


RE: Message_name

Posted by Disha <di...@openskysoftware.com>.
On Fri, 2003-03-07 at 15:33, Noel J. Bergman wrote:
> > The message_name is written according to the current system time during
> > the time the mail is stored.
> 
> The mail name is attached in SMTPHandler before the message is given to the
> MailServer to process.  Therefore it is present long before your mailets
> would ever see it.

But that mail name is different from what gets written in the
message_name field in the inbox at time of store mail.
The storemail method of James creates a new MailImpl with the
message_name as the current time in milliseconds. I went ahead and
hacked that to store the message_name of the original mail. 

Would that be ok? I dont know if that would create any kind of error
during pop or anything else.

--Disha
> 
> 	--- Noel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
-- 
Disha <di...@openskysoftware.com>


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


RE: Message_name

Posted by "Noel J. Bergman" <no...@devtech.com>.
> The message_name is written according to the current system time during
> the time the mail is stored.

The mail name is attached in SMTPHandler before the message is given to the
MailServer to process.  Therefore it is present long before your mailets
would ever see it.

	--- Noel


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


Re: Message_name

Posted by Disha <di...@openskysoftware.com>.
The message_name is written according to the current system time during
the time the mail is stored. Since there is no accurate way of
predicting what that message_name will be before hand, we cannot get the
message_name or so I think.
But once the mail is written to the inbox a query can be written to get
the message_name. Do you think assuming that the last mail written to
the table is the one being processed by myMailet if myMailet is called
immediately after the LocalDelivery Mailet. I dont let the mail status
to be set to ghost in localDelivery.

Your help will be greatly appreciated,
Thanks,
Disha 
On Fri, 2003-03-07 at 11:09, Disha wrote:
> I am using database repository for storing mails. Every incoming mail
> goes thru 2 mailets; one the LocalDelivery and another similar to it
> that writes the mail to myinbox. I want to store the reference to this
> mail from James inbox in myinbox. Is there a way we can get the
> message_name of this mail that would be written to the inbox in the
> transport processor? 
> mail.getName() does not turn out to be the same when this mail passes
> thru myMailet from what gets written in the inbox. They differ by the
> last 4 digits. I want to be able to somehow get the message_name that
> would be written in the inbox table in myMailet so I can have a
> reference to the mail in both the tables.
>  Any suggestions?
> 
> Thanks,
> Disha
-- 
Disha <di...@openskysoftware.com>


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