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 Gonçalo Luiz <go...@gmail.com> on 2005/10/13 09:56:14 UTC
Embed James in an Application
Hello,
What I want to do is the following: I have an application (say MyApp)
which I want to start receiving and sending mail. Therefore, I want to
run james from MyApp (rather than from the command line) application
so I can directly access James' classes (for they will be running on
the same JVM).
I will then write a mailet that will invoke some classes in MyApp to
process the e-mail then contact James again to forward the mail.
The problem I've found is that there is no information on how to embed
James in an application.
Best Regards,
--
Gonçalo Luiz
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Embed James in an Application
Posted by Gonçalo Luiz <go...@gmail.com>.
Hello,
thanks for your reply, Danny.
I will integrate my (web) app with james exposing a web-service or a
servlet. This way I can even integrate my web app with any MTA that is
able to invoke a web service or post the e-mail in a form.
Thank you once again,
Gonçalo Luiz
On 10/14/05, Danny Angus <Da...@slc.co.uk> wrote:
> It is better to integrate the two applications than to embed James.
> Have your mailet connect to your app or embed your app in a mailet.
>
> If it is a web-app I would be tempted to make your app expose a web-service
> and have your mailet call that.
> Or you could have james put things on a queue (use a messaging product (a
> JMS implementation) or make your own simple queue with files or James
> repositories if you like) for your app to dequeue and process. Or you could
> try RMI or any of a zillion other systems integration techniques.
> Make your app use SMTP to introduce new mail into James, its simple, robust
> and It Works.
>
>
> d.
>
>
>
>
>
>
> |---------+---------------------------->
> | | Gonçalo Luiz |
> | | <goncalo.luiz@gma|
> | | il.com> |
> | | |
> | | 13/10/2005 08:56 |
> | | Please respond to|
> | | "James Users |
> | | List" |
> |---------+---------------------------->
> >-------------------------------------------------------------------------------------------------------------------------------|
> | |
> | To: server-user@james.apache.org |
> | cc: |
> | Subject: Embed James in an Application |
> >-------------------------------------------------------------------------------------------------------------------------------|
>
>
>
>
> Hello,
> What I want to do is the following: I have an application (say MyApp)
> which I want to start receiving and sending mail. Therefore, I want to
> run james from MyApp (rather than from the command line) application
> so I can directly access James' classes (for they will be running on
> the same JVM).
>
> I will then write a mailet that will invoke some classes in MyApp to
> process the e-mail then contact James again to forward the mail.
>
> The problem I've found is that there is no information on how to embed
> James in an application.
>
> Best Regards,
> --
> Gonçalo Luiz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
>
>
> ***************************************************************************
> The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient (or responsible for delivery of the message to the intended recipient) please notify us immediately on 0141 306 2050 and delete the message from your computer. You may not copy or forward it or use or disclose its contents to any other person. As Internet communications are capable of data corruption Student Loans Company Limited does not accept any responsibility for changes made to this message after it was sent. For this reason it may be inappropriate to rely on advice or opinions contained in an e-mail without obtaining written confirmation of it. Neither Student Loans Company Limited or the sender accepts any liability or responsibility for viruses as it is your responsibility to scan attachments (if any). Opinions and views expressed in this e-mail are those of the sender and may not reflect the opinions and views of The Student Loans Company Limited.
>
> This footnote also confirms that this email message has been swept for the presence of computer viruses.
>
> **************************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
--
Gonçalo Luiz
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Embed James in an Application
Posted by Stefano Bagnara <ap...@bago.org>.
I don't understand exactly what do you need: maybe you can explain what your
application is and what kind of integration you need.
It is probably easier to integrate your app in James instead.
You can create a new custom Mailet that contains your application and
process messages as they are matched by your configuration.
If this is not enough you can create a new Avalon Service and understand how
assembly.xml and *.xinfo files work!
Stefano
> What I want to do is the following: I have an application
> (say MyApp) which I want to start receiving and sending mail.
> Therefore, I want to run james from MyApp (rather than from
> the command line) application so I can directly access James'
> classes (for they will be running on the same JVM).
>
> I will then write a mailet that will invoke some classes in
> MyApp to process the e-mail then contact James again to
> forward the mail.
>
> The problem I've found is that there is no information on how
> to embed James in an application.
>
> Best Regards,
> --
> Gonçalo Luiz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Embed James in an Application
Posted by Danny Angus <Da...@slc.co.uk>.
It is better to integrate the two applications than to embed James.
Have your mailet connect to your app or embed your app in a mailet.
If it is a web-app I would be tempted to make your app expose a web-service
and have your mailet call that.
Or you could have james put things on a queue (use a messaging product (a
JMS implementation) or make your own simple queue with files or James
repositories if you like) for your app to dequeue and process. Or you could
try RMI or any of a zillion other systems integration techniques.
Make your app use SMTP to introduce new mail into James, its simple, robust
and It Works.
d.
|---------+---------------------------->
| | Gonçalo Luiz |
| | <goncalo.luiz@gma|
| | il.com> |
| | |
| | 13/10/2005 08:56 |
| | Please respond to|
| | "James Users |
| | List" |
|---------+---------------------------->
>-------------------------------------------------------------------------------------------------------------------------------|
| |
| To: server-user@james.apache.org |
| cc: |
| Subject: Embed James in an Application |
>-------------------------------------------------------------------------------------------------------------------------------|
Hello,
What I want to do is the following: I have an application (say MyApp)
which I want to start receiving and sending mail. Therefore, I want to
run james from MyApp (rather than from the command line) application
so I can directly access James' classes (for they will be running on
the same JVM).
I will then write a mailet that will invoke some classes in MyApp to
process the e-mail then contact James again to forward the mail.
The problem I've found is that there is no information on how to embed
James in an application.
Best Regards,
--
Gonçalo Luiz
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
***************************************************************************
The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient (or responsible for delivery of the message to the intended recipient) please notify us immediately on 0141 306 2050 and delete the message from your computer. You may not copy or forward it or use or disclose its contents to any other person. As Internet communications are capable of data corruption Student Loans Company Limited does not accept any responsibility for changes made to this message after it was sent. For this reason it may be inappropriate to rely on advice or opinions contained in an e-mail without obtaining written confirmation of it. Neither Student Loans Company Limited or the sender accepts any liability or responsibility for viruses as it is your responsibility to scan attachments (if any). Opinions and views expressed in this e-mail are those of the sender and may not reflect the opinions and views of The Student Loans Company Limited.
This footnote also confirms that this email message has been swept for the presence of computer viruses.
**************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org