Using E-Mail function

Stimulsoft Reports.Flex discussion
Locked
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Using E-Mail function

Post 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.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: Using E-Mail function

Post 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 ?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Using E-Mail function

Post 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.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: Using E-Mail function

Post 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.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Using E-Mail function

Post 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:
FXFLEX_2014.05.05_Trial.zip
(5.04 MiB) Downloaded 392 times
Thank you.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: Using E-Mail function

Post 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.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Using E-Mail function

Post by HighAley »

Hello.

We are glad to help you.
Let us know if you need any additional help.

Thank you.
Locked