Send email: sender name and filename

Stimulsoft Reports.JS discussion
Post Reply
dkolar
Posts: 9
Joined: Fri Nov 04, 2016 6:41 am

Send email: sender name and filename

Post by dkolar »

Hi,
I'm trying to set sender name and file name when sending e-mail.

As for sender name, default name is John Smith and I do not see where to change it. Additionally, it would be helpful to integrate some kind of 'mailto' function to open default email service app and attach exported file.

I have done following to get specified fileName on export, but it's not working on e-mail sending:

Code: Select all

	viewer.onBeginExportReport = function (args) {
			<?php //StiHelper::createHandler(); ?>
			args.fileName = "Ponuda_"+report.dictionary.variables.getByName("pon").valueObject+'-'+report.dictionary.variables.getByName("god").valueObject;
		}
Help :)
Thanks!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Send email: sender name and filename

Post by Alex K. »

Hello,

You can use the following event:

Code: Select all

// Send exported report to Email
viewer.onEmailReport = function (args) {
  // args.settings - email settings from viewer dialog
  // args.format - export format for attachment
  // args.fileName - attachment file name
  // args.data - exported data in base64 format
 
  // core for sending email can be here
}
Thank you.
Post Reply