Page 1 of 1

Send email: sender name and filename

Posted: Wed Jan 24, 2018 6:02 am
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!

Re: Send email: sender name and filename

Posted: Fri Jan 26, 2018 9:46 am
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.