Can JasperReports Server deliver a report via email with a read-receipt request? - jasperserver

We have a JR 6.0.x server and we'd like to email reports to people and get read-receipts. Is that something that is possible to do?
Simply adding an arbitrary SMTP header would work, too, since that's all a read-receipt requires. If JR server doesn't support read-receipts directly, is there a way to add headers to the delivery messages?

Related

Is there an OTRS function or extension to use it as a mail MITM / proxy?

My system creates a ticket in OTRS 5 with data about two parties that should communicate with one another, but only so that all communication is logged in OTRS when any one of them replies.
Unless they explicitly communicate each other's e-mail addresses and use those ones to talk directly, that is, of course.
Is there an extension or other software to do this?
Using a mail server instead of OTRS requires both the mail server and OTRS to have access to both parties' identities so the server can link both, so this is probably less ideal.
Looks like an easier solution is to hack the mail server and use something like procmail and use it as a MITM rather than fiddle with OTRS extensions which may cause problems when upgrading OTRS.
The idea is to reversible-encode the participants' e-mail addresses and use those as virtual addresses (and maybe add some signature or something to prevent an open-relay disaster).
E.g. user#example.com becomes 75736572406578616d706c652e636f6d-a5167043#mitm-mail.acme.
E-mail headers are rewritten (From, Reply-To, To, Cc, Bcc) to enable the MITM server.
An OTRS ticket is created first to get its ticket ID and embed it into the subject so that we can send out a copy to OTRS whenever mails are exchanged.

Can I replace Sitecore Email Sending Service?

By default smtp server can be configed in Sitecore web.config. However is it possible to hijack the whole email sending part to use a different method instead of a smtp server? Is there some kind of pipeline?
For example, I want to use another web service to send all emails, or I want to save all of them into a database instead of actually sending them?
Also a different question would be, does content delivery instance need to send emails by default? I would assume all out-of-box email sending are from content authoring instance right?
And from my understanding, there's only workflows in Sitecore need to send emails and it can be customized by changing the email action. (Assume no Email Campaign Modules, no Webform for Markets module and etc.)
Any insight would be great help, thanks!
--------------Update---------------------29/09/2015--------------
I have got my answers, thanks everyone.
Basically I shouldn't need to working about the smtp server on CDS instances, and all email sending can be controlled by pipelines on CAS instances.
However when I checked the source code, there's only one place "Reminder" which uses the smtp server to send emails directly. So if this function is important to you, you should consider update this function.
Yes absolutely.
At runtime when you are defining the SMTPClient you can set the properties for the server by the following code
SmtpClient client=new SmtpClient("Host");
client.Credentials=new NetworkCredential("username", "password");
MailMessage mailMessage = new MailMessage();
mailMessage.from="sender#gmail.com";
mailMessage.To.Add("recipient#gmail.com");
mailMessage.body="body";
mailMessage.subject="subject";
client.Send(mailMessage);
What you can do, instead of having the values hardcoded in the code you can retrieve the values from Sitecore Items and use those, this will allow greater control for Content Editors and even use different SMTP Server in different parts of functionality.
Item emailItem = Sitecore.Context.Database.GetItem("Id of Item");
string from = emailItem["From"];
string to = emailItem["To"];
string server = emailItem["Mail server"];
string subject = emailItem["Subject"];
string message = emailItem["Message"];
There is a SendEmail pipeline apart of Sitecore's EXM aka ECM which you can override if you take the EXM route. It has two processors FillEmail and SendEmail which you can utilise or remove and add your own processor for actually sending the message.
It is possible to save the emails to a database, or rather the content, instead of sending them. This can be achieved by custom code in Sitecore or Webforms for Marketers which has Save Actions for Sending Emails or Saving to a Database and its really simple to configure.
As you said there is no need to send emails on every occasion its more about determining what you are trying to achieve and if Sending Emails, Saving to Database etc is more relevant. The great thing about Sitecore is you can create Items programmatically and store the information there, save you worrying about creating database tables, managing ConnectionStrings, setting up EntityFramework etc.
Here is a simple blog on creating Sitecore Items Programmatically.
Sitecore Workflow sending Emails is optional and can be removed by deleting the Send Email CommandAction Item from beneath the WorkflowState Item and then publish.
The easiest way to intercept all emails is to configure Sitecore to send all emails to the locally hosted SMTP server (127.0.0.1) and then grab them from there using your custom code.
There is a lot of free SMTP servers, just make sure you test them with high volume of emails before moving to production.

Set SMTP envelope MAIL FROM using grails asynchronous mail plugin

I'd like to set the SMTP envelope sender to a different value per message in some grails code, distinct from the message From: address, which I want to be the same for each email.
This is to do VERP-like bounce tracking.
I can't see a way to set this in an asynchronousMailService.sendMail call. Is there?
As it stands there is a pull request for the Grails mail plugin to add support for this. There is also a blog post which talks about this specific feature. If you need this feature you can always download the forked version of the plugin.

Is there any way to set a header in an html email within the body of the email?

I have a client who needs some html mass emails sent. I've coded the email, but for some reason, probably a problem with their mail client, the test emails they've received have been marked with low importance.
I believe I could override this by adding an x-priority header to the email, however the mass mail service I'm forced to use (have no choice about this unfortunately) won't allow me to customize headers.
Is it possible to set the header within the actual body of the email? Are there html tags that allow for this?
No. Email HTML is just markup, and clients don't read the content for headers.
Which client are they using? Some clients (Hotmail, Gmail) analyse the content and assign their own rule, so there is no header you can change. This is done at the mailserver level, so if a user's client is, say, Thunderbird but their server is Gmail, it may still mark as low priority based on Gmail's rules.
If the client is Outlook and the mailserver is an in-house Postfix installation (for example), then you can set X Headers but by default, Outlook will strip them. For this reason, I suspect either the server or the client is setting the priority, it's not at the send level.
Look at the original source, and see whether or not it does contain the Priority header.

ClearQuest Custom Email

I'm trying to create a custom email for ClearQuest in order to:
format the message more neatly
include a hyperlink to a change request (which is based on the Defect schema) on our local intranet
The only way I know of to send an email is to add an email rule using a static form submission via a Email_Rule Stateless Record Type (which comes with the Defect schema). The only customization it allows is to select the fields to include in the email, the criteria specifying when to send the email (e.g. when the state changes), and who to send it to.
I'm assuming a script is run (either in VB or Perl) in order to aggregate the information needed for the email and perhaps another to actually send the email. I'm looking for one or both of those scripts. Does anyone know where those scripts are located on a ClearQuest server?
I've come across various references from IBM that pertain to custom emails, but none were very helpful.
http://www.ibm.com/developerworks/rational/library/4329.html (from 2003 and ClearQuest v1.1)
http://www.ibm.com/developerworks/rational/library/3931.html (from 2002, no version specified)
We're using ClearQuest v7.1.2. Does anyone know of any good references dealing with ClearQuest custom emails?
We are using Clear Quest Email Notification Package, that allows much more flexible email notifications.
Link
The package is compatible with ClearQuest 7.1.2.
You can download new version from the following location:
http://cqadmin.org/wiki/ClearQuest_Email_Notification_Package
Newer versions of ClearQuest have a new Email notification package that does what you want and is also robust to network failures and supports different email services and a high level of security. That is, the email is saved as a record and a service runs that ensures emails get sent.
The name of the package is EmailPlus and it also uses a WebApp, EmailRelay, which performs the email notification duties.
More details found here.
https://www.ibm.com/support/knowledgecenter/SSSH5A_8.0.0/com.ibm.rational.clearquest.schema.ec.doc/topics/sch_pkgs/c_emp_package.htm