Cloud
Облачный сервис для быстрого и эффективного анализа и визуализации данных для вашего бизнеса без необходимости создания своих приложений и программирования.
$viewer->options->toolbar->showSendEmailButton = true;
$viewer->options->email->defaultEmailAddress = 'recipient@stimulsoft.com';
$viewer->options->email->defaultEmailSubject = 'Default subject';
$viewer->onEmailReport = function (StiEmailEventArgs $args) {
$args->settings->from = 'sender@stimulsoft.com';
$args->settings->host = 'smtp.stimulsoft.com';
$args->settings->login = '********';
$args->settings->password = '********';
return StiResult::getSuccess('The Email has been sent successfully.');
};
$viewer->process();toolbar->showSendEmailButton — adds the Send Email button to the viewer toolbar.email->defaultEmailAddress / defaultEmailSubject — pre-fills the recipient and subject in the send dialog.onEmailReport — fires on the server when the user sends; here you set the SMTP host, login and password.StiResult::getSuccess(...) — returns a result to the viewer confirming the message was sent.onEmailReport you supply the SMTP settings and send the message, returning a result to the viewer.