[ 
https://issues.apache.org/jira/browse/JAMES-3018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17014154#comment-17014154
 ] 

Benoit Tellier edited comment on JAMES-3018 at 1/13/20 9:30 AM:
----------------------------------------------------------------

Hi,
Apache James have no support for calendaring.
We are doing something similar within the OpenPaaS Project [1] on top of Apache 
James.

[1] https://open-paas.org/

Concretely we set up a calendaring pipeline using mailets and matchers, mail 
attachment are parsed, ICS files are detected, their content extracted, and 
pushed over an AMQP channel for other apps to react on it.

Here is such an example of pipeline (mailetcontainer.xml):


{code:xml}
            <!-- ICAL pipeline -->
            <mailet match="All" class="StripAttachment">
                <mimeType>text/calendar</mimeType>
                <attribute>rawIcalendar</attribute>
            </mailet>
            <mailet match="All" class="MimeDecodingMailet">
                <attribute>rawIcalendar</attribute>
            </mailet>
            <mailet match="All" class="ICalendarParser">
                <sourceAttribute>rawIcalendar</sourceAttribute>
                <destinationAttribute>icalendar</destinationAttribute>
            </mailet>
            <mailet match="All" class="ICALToHeader">
                <attribute>icalendar</attribute>
            </mailet>
            <mailet match="RecipientIsLocal" class="LogMessage"/>
            <mailet match="All" class="ICALToJsonAttribute">
                <source>icalendar</source>
                <destination>icalendarAsJson</destination>
                <rawSource>rawIcalendar</rawSource>
            </mailet>
            <mailet match="All" class="AmqpForwardAttribute">
                <uri>amqp://rabbitmq:5672</uri>
                <exchange>james:events</exchange>
                <attribute>icalendarAsJson</attribute>
            </mailet>
            <!-- End of ICAL pipeline -->
{code}

Some headers are added to the mail to help corelating it with events.

Does it answers better your question?

Regards,

Benoit Tellier



was (Author: btellier):
Hi,
Apache James have no support for calendaring.
We are doing something similar within the OpenPaaS Project [1] on top of Apache 
James.

[1] https://open-paas.org/

Concretely we set up a calendaring pipeline using mailets and matchers, mail 
attachment are parsed, ICS files are detected, their content extracted, and 
pushed over an AMQP channel for other apps to react on it.

Here is such an example of pipeline (mailetcontainer.xml):


{code:xml}
            <!-- ICAL pipeline -->
            <mailet match="All" class="StripAttachment">
                <mimeType>text/calendar</mimeType>
                <attribute>rawIcalendar</attribute>
            </mailet>
            <mailet match="All" class="MimeDecodingMailet">
                <attribute>rawIcalendar</attribute>
            </mailet>
            <mailet match="All" class="ICalendarParser">
                <sourceAttribute>rawIcalendar</sourceAttribute>
                <destinationAttribute>icalendar</destinationAttribute>
            </mailet>
            <mailet match="All" class="ICALToHeader">
                <attribute>icalendar</attribute>
            </mailet>
            <mailet match="RecipientIsLocal" class="LogMessage"/>
            <mailet match="All" class="ICALToJsonAttribute">
                <source>icalendar</source>
                <destination>icalendarAsJson</destination>
                <rawSource>rawIcalendar</rawSource>
            </mailet>
            <mailet match="All" class="AmqpForwardAttribute">
                <uri>amqp://rabbitmq:5672</uri>
                <exchange>james:events</exchange>
                <attribute>icalendarAsJson</attribute>
            </mailet>
            <!-- End of ICAL pipeline -->
{code}

Does it answers better your question?

Regards,

Benoit Tellier


> How to develop an new app depend on Apache james?
> -------------------------------------------------
>
>                 Key: JAMES-3018
>                 URL: https://issues.apache.org/jira/browse/JAMES-3018
>             Project: James Server
>          Issue Type: Wish
>          Components: Deployment Modules
>            Reporter: 826749...@qq.com
>            Priority: Major
>         Attachments: Process.png
>
>
> I want to develop an new app depend on Apache james , but I do not konw how 
> to get message from James except Java mail .So I want to know  how to use the 
> Apache James api to realize my idea. Please give me some help!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to