Cloud
Cloud-Dienstleistung für schnelle und effektive Analyse und Visualisierung von Daten für Ihr Business ohne eigene Applikationen zu erstellen oder zu programmieren.
public IActionResult InitViewer()
{
var requestParams = StiReactViewer.GetRequestParams(this);
var options = new StiReactViewerOptions();
options.Actions.GetReport = "GetReport";
options.Actions.ViewerEvent = "ViewerEvent";
options.Toolbar.ShowSendEmailButton = true;
return StiReactViewer.ViewerDataResult(requestParams, options);
}EmailReport action. Retrieve the prepared e-mail options and fill in the SMTP settings of your mail server:[HttpPost]
public IActionResult EmailReport()
{
StiEmailOptions options = StiReactViewer.GetEmailOptions(this);
// Recipient, subject and body come from the viewer and can be adjusted here
// options.AddressTo = "";
// options.Subject = "";
// options.Body = "";
// Your mail server settings
options.AddressFrom = "admin_address@test.com";
options.Host = "smtp.test.com";
options.Port = 465;
options.UserName = "admin_address@test.com";
options.Password = "admin_password";
return StiReactViewer.EmailReportResult(this, options);
}StiEmailOptions object returned by GetEmailOptions already contains the recipient, subject and the exported attachment prepared by the viewer; you only supply the server-side delivery details (host, port, credentials, sender). EmailReportResult then sends the message and reports the result back to the viewer.