Page 1 of 1
Using E-Mail function
Posted: Tue Apr 29, 2014 11:18 pm
by hugo
Hello,
I need now to use the built-in send to e-mail function from the preview.
I tried to send and I get "Error Saving. Server not responding."
I guess, that I need to configure somewhere the smtp server, etc ... or I need to do something to a server side application to send the e-mail.
Re: Using E-Mail function
Posted: Thu May 01, 2014 9:09 am
by hugo
I found and event that I can capture, when the user press the open e-mail form but I can't find out an event when the user press the send e-mail button to process the same and this is also missing from the documentation.
What I'm missing here ?
Re: Using E-Mail function
Posted: Fri May 02, 2014 1:36 pm
by Vladimir
Hello,
To send Email, please use the StiViewerEvent.SEND_EMAIL event:
Code: Select all
viewerComponent.addEventListener(StiViewerEvent.SEND_EMAIL, onSendEmail);
...
private function onSendEmail(event: StiViewerEvent): void
{
// Send Email code
}
For Reports.Fx for Flex no built-in send Email algorithm, you should take care about it yourself. In other products, this function performs the server side (ASP.NET, PHP, Java).
- - -
We tested this event and found that in the new release 2014.1 improperly handled a dialog where you need to fill in the settings for sending Email. We will try to resolve this error until the next prerelease build. At this moment, you can disable the dialog and use the specified event without it. To do this, please set the following option:
Code: Select all
StiOptions.viewer.appearance.showEmailDialog = false;
Thank you.
Re: Using E-Mail function
Posted: Fri May 02, 2014 10:12 pm
by hugo
Yes, I had already found out the StiViewerEvent.SEND_EMAIL.
That event is fired when the user press the E-Mail button from the toolbar. There is still not control over the confirmation button (from the mail dialog) so the developer could interact and send the real e-mail (from a backend for instance).
Even disabling the e-mail dialog as you suggested, I can capture the e-mail request when the user press the e-mail button (from the toolbar), however, then the user get the message "Error Saving. Server not responding."
There is any way to avoid this error (or better to notify the event about the sucess, failure or even the progress), otherwise there is no sense to use a button that always gives and error without control ?
Thanks in advance.
Re: Using E-Mail function
Posted: Mon May 05, 2014 8:13 am
by Vladimir
Hello Hugo,
We completed the fix in the StiViewerEvent.SEND_EMAIL event, now this event is working correctly. Please check the updated libraries in the attached archive:
Thank you.
Re: Using E-Mail function
Posted: Mon May 05, 2014 9:51 am
by hugo
I just testing in both modes (showEmailDialog true/false) and it's working as should be in my version so I suppose that no one it's using this feature in Flex version.
Re: Using E-Mail function
Posted: Tue May 06, 2014 9:43 am
by HighAley
Hello.
We are glad to help you.
Let us know if you need any additional help.
Thank you.