Send exported reports as email

Description

Add new option to send exported files as email attachment via smtp(s)

Environment

None

Activity

Show:
Marco Ardito
May 25, 2015, 8:41 AM

this would be great to have in jasperstarter, too...
some free thoughts, maybe for later versions:

  • an option to specify an html template for the email body would be nice (with parameters? or an interactive form to complete body, subject & send?)

  • an option (and a way) to use the default user email desktop client would be great too (so the user could export&send a pdf file and find it in his "sent" folder... I think on windows is doable, at least. MAPI?). but this could prove very difficult to do consistently across all clients & OS, and: most people uses webmail nowadays, but in my company we still use desktop clients and this would be perfect for us.

as said, just free thoughts

Shaheed Haque
November 27, 2018, 1:25 PM

As with JAS-90, this approach to integration would likely have technical completeness issues, and as @Marco hinted, there would be substantial portability issues too.

I would suggest this is beyond the scope of jasperstarter, and better handled by a higher layer if needed (JAS-89/JAS-97 and might be of interest in such a layer, but even they are not strictly needed).

Volker Voßkämper
November 28, 2018, 7:41 PM

I was not so much thinking about client side support.

As of now it is possible to pipe the output to a program like mailx or something. This works at least on Unix based systems but is not really nice because the filename is lost and no option for additional text.
But is a quick and dirty solution on client and server at least with only one output file.

A first step could be to create a multipart mime output containing ALL output files and optional header file.
This could be piped into a mua or send via smtp.

For client support we could create .eml for import into Thunderbird. I think Outlook has similar option.

Most servers have sendmail/postfix accepting anonymous connections from localhost. So sending a bunch of reports via smtp (JavaMail API) should not such big task...

Shaheed Haque
November 29, 2018, 9:27 AM

Thanks for the clarification.

This use case is somewhat analogous to one of mine, however in my case email is not the final destination, it is instead a zip file. I have approached this using the API to provide conveniently scriptable access via Python (though clearly Java would be just as easy). I use stdin and stdout from JAS-89/JAS-97 to manage the I/O.

My point, then, is simply that jasperstarter (as an executable) should not be the repository for such new functionality, but jasperstarter.jar (as a library) can certainly be a fine starting point. If you find there is utility in having a command line program for your purpose, that is also fine...I just would not recommend adding a bunch of command line options to jasperstarter for this. Maybe it can be called jaspersender?

Assignee

Volker Voßkämper

Reporter

Volker Voßkämper

Labels

None

Components

Fix versions

Priority

Major
Configure