Hi Vincent,

Sorry, I overlooked that my mail with the sources did not reach the list. Here it is.

Christian

---------- Weitergeleitete Nachricht ----------
Von: "Christian Grün" <christian.gruen@gmail.com>
Datum: 23.09.2015 3:51 nachm.
Betreff: Re: [basex-talk] BaseX, Zorba, e-mail module
An: "Tim Thompson" <timathom@gmail.com>
Cc:

> Is there an XSD for the e-mail document format being used? (And this module
> is compatible with the BaseX open source license, correct?)

No, sorry, there is no XSD available. However, you are invited to
create one; I have attached the Java sources to this mail, which
should contain all information you need.

The Java code is based on the standard Java JavaMail API [1,2].

Hope this helps,
Christian

[1] http://www.oracle.com/technetwork/java/javamail/index.html
[2] https://java.net/projects/javamail/pages/License



> Tim A. Thompson
> Metadata Librarian (Spanish/Portuguese Specialty)
> Princeton University Library
>
>
> On Wed, Sep 23, 2015 at 3:24 AM, Christian Grün <christian.gruen@gmail.com>
> wrote:
>>
>> Hi Tim,
>>
>> We have implemented an XQuery/Java e-mail module quite some time ago,
>> which we are using in various commercial projects. The main reason why
>> we didn't make it public yet is that we didn't have time to document
>> it properly. I have just uploaded this module, and you can install it
>> via:
>>
>>   repo install
>> http://files.basex.org/modules/org/basex/modules/email/EMail.jar
>>
>> The jar file contains two simple example for sending mails (in the
>> xquery sub-directory).
>>
>> Looking forward to your feedback.
>> Christian
>> ___________________________________
>>
>> On Wed, Sep 23, 2015 at 7:04 AM, Tim Thompson <timathom@gmail.com> wrote:
>> > Hello,
>> >
>> > I would like to be able to send e-mail from a Web app I am developing in
>> > BaseX and was wondering whether anyone else had implemented this
>> > functionality (or whether a BaseX e-mail module might be in the works?).
>> >
>> > I see that Zorba has an e-mail module with support for SMTP and IMAP
>> > (not to
>> > mention many other useful modules), which leads me to wonder whether
>> > anyone
>> > has worked on a BaseX connector for Zorba.
>> >
>> > In the meantime, I decided to try using the BaseX process module to call
>> > Zorba, like so:
>> >
>> > proc:system(
>> >   'zorba', (
>> >     '-q', convert:binary-to-string(
>> >       db:retrieve(
>> >         'out', 'email.xq'
>> >       )
>> >     )
>> >   )
>> > )
>> >
>> > I stored the XQuery code for Zorba as a raw file in the BaseX database,
>> > since storing it in the webapp directory caused an error, due to the
>> > unrecognized Zorba module declarations. This approach seems to work
>> > adequately, but does anyone have any suggestions for improvement, or a
>> > different approach?
>> >
>> > Thanks in advance,
>> > Tim
>> >
>> >
>> > --
>> > Tim A. Thompson
>> > Metadata Librarian (Spanish/Portuguese Specialty)
>> > Princeton University Library
>> >
>
>