BaseX, Zorba, e-mail module

Wednesday, 23 September 2015 · 6 messages · last reply 5 Feb 2016
TT
Tim Thompson23 Sep 2015 09:05 #
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
CG
Christian Grün23 Sep 2015 09:24 #
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
Quoted text · Tim Thompson · 39 lines
On Wed, Sep 23, 2015 at 7:04 AM, Tim Thompson <timathom at 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 >
LV
Lizzi, Vincent4 Feb 2016 22:45 #
Hi Christian, I’m having trouble installing the BaseX email module. The install appears to succeed but then the module is not available. BaseX 8.4 beta 2fabc36 [Standalone] Try 'help' to get more information.
Quoted text · Christian Grün · 1 line
> repo install http://files.basex.org/modules/org/basex/modules/email/EMail.jar
Quoted text · Christian Grün · 1 line
> repo list
Name Version Type Path ------------------------- 0 package(s). After attempting to install the module, when trying the email.xq example there is an error message “[XQST0059] Module 'http://basex.org/modules/email/EMail' not found.” Does the email module work with current versions of BaseX? Also, is it possible to send HTML formatted email with images using the email module? Thank you, Vincent
Quoted text · basex-talk-bounces at mailman.uni-konstanz.de · 55 lines
From: basex-talk-bounces at mailman.uni-konstanz.de [mailto:basex-talk-bounces at mailman.uni-konstanz.de] On Behalf Of Christian Grün Sent: Wednesday, September 23, 2015 3:24 AM To: Tim Thompson <timathom at gmail.com> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] BaseX, Zorba, e-mail module 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<https://protect-us.mimecast.com/s/oXA1BRUEalRTo> 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 at gmail.com<mailto:timathom at 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 >
CG
Christian Grün5 Feb 2016 00:26 #
Hi Vincent, I'm sorry, we have no time to provide better support for this module. Maybe you can take advantage of the source code that I referenced in an earlier reply? It should be pretty straightforward. Maybe you could build an updated module and provide it back to the community? Christian Am 04.02.2016 10:45 nachm. schrieb "Lizzi, Vincent" < Vincent.Lizzi at taylorandfrancis.com>:
Quoted text · Lizzi, Vincent · 128 lines
> Hi Christian, > > > > I’m having trouble installing the BaseX email module. The install appears > to succeed but then the module is not available. > > > > BaseX 8.4 beta 2fabc36 [Standalone] > > Try 'help' to get more information. > > > repo install > http://files.basex.org/modules/org/basex/modules/email/EMail.jar > > Package 'http://files.basex.org/modules/org/basex/modules/email/EMail.jar' > installed in 1556.4 ms. > > > repo list > > Name Version Type Path > > ------------------------- > > > > 0 package(s). > > > > After attempting to install the module, when trying the email.xq example > there is an error message “[XQST0059] Module ' > http://basex.org/modules/email/EMail' not found.” > > > > Does the email module work with current versions of BaseX? > > > > Also, is it possible to send HTML formatted email with images using the > email module? > > > > Thank you, > > Vincent > > > > > > > > > > *From:* basex-talk-bounces at mailman.uni-konstanz.de [mailto: > basex-talk-bounces at mailman.uni-konstanz.de] *On Behalf Of *Christian Grün > *Sent:* Wednesday, September 23, 2015 3:24 AM > *To:* Tim Thompson <timathom at gmail.com> > *Cc:* BaseX <basex-talk at mailman.uni-konstanz.de> > *Subject:* Re: [basex-talk] BaseX, Zorba, e-mail module > > > > 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 > <https://protect-us.mimecast.com/s/oXA1BRUEalRTo> > > 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 at 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 > > >
LV
Lizzi, Vincent5 Feb 2016 03:34 #
Hi Christian, I might be able get it working. The link you mentioned isn’t easily findable in the list archive. Where is the source of the email module located? Thanks, Vincent
Quoted text · Christian Grün · 79 lines
From: Christian Grün [mailto:christian.gruen at gmail.com] Sent: Thursday, February 04, 2016 6:27 PM To: Lizzi, Vincent <Vincent.Lizzi at taylorandfrancis.com> Cc: Tim Thompson <timathom at gmail.com>; BaseX <basex-talk at mailman.uni-konstanz.de> Subject: RE: [basex-talk] BaseX, Zorba, e-mail module Hi Vincent, I'm sorry, we have no time to provide better support for this module. Maybe you can take advantage of the source code that I referenced in an earlier reply? It should be pretty straightforward. Maybe you could build an updated module and provide it back to the community? Christian Am 04.02.2016 10:45 nachm. schrieb "Lizzi, Vincent" <Vincent.Lizzi at taylorandfrancis.com<mailto:Vincent.Lizzi at taylorandfrancis.com>>: Hi Christian, I’m having trouble installing the BaseX email module. The install appears to succeed but then the module is not available. BaseX 8.4 beta 2fabc36 [Standalone] Try 'help' to get more information. > repo install http://files.basex.org/modules/org/basex/modules/email/EMail.jar<https://protect-us.mimecast.com/s/lN5JBRUa5O8kTm> Package 'http://files.basex.org/modules/org/basex/modules/email/EMail.jar<https://protect-us.mimecast.com/s/lN5JBRUa5O8kTm>' installed in 1556.4 ms. > repo list Name Version Type Path ------------------------- 0 package(s). After attempting to install the module, when trying the email.xq example there is an error message “[XQST0059] Module 'http://basex.org/modules/email/EMail<https://protect-us.mimecast.com/s/zNXlBdUlrngxuZ>' not found.” Does the email module work with current versions of BaseX? Also, is it possible to send HTML formatted email with images using the email module? Thank you, Vincent From: basex-talk-bounces at mailman.uni-konstanz.de<mailto:basex-talk-bounces at mailman.uni-konstanz.de> [mailto:basex-talk-bounces at mailman.uni-konstanz.de<mailto:basex-talk-bounces at mailman.uni-konstanz.de>] On Behalf Of Christian Grün Sent: Wednesday, September 23, 2015 3:24 AM To: Tim Thompson <timathom at gmail.com<mailto:timathom at gmail.com>> Cc: BaseX <basex-talk at mailman.uni-konstanz.de<mailto:basex-talk at mailman.uni-konstanz.de>> Subject: Re: [basex-talk] BaseX, Zorba, e-mail module 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<https://protect-us.mimecast.com/s/lN5JBRUa5O8kTm> 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 at gmail.com<mailto:timathom at 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 >
CG
Christian Grün5 Feb 2016 05:58 #
Hi Vincent, Sorry, I overlooked that my mail with the sources did not reach the list. Here it is. Christian ---------- Weitergeleitete Nachricht ----------
Quoted text · Christian Grün · 89 lines
Von: "Christian Grün" <christian.gruen at gmail.com> Datum: 23.09.2015 3:51 nachm. Betreff: Re: [basex-talk] BaseX, Zorba, e-mail module An: "Tim Thompson" <timathom at 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 at 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 at 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 >> > > >

⚡Generated with XQuery