Create the document in memory in PHP and send it as an e-mail attachment without leaving a temporary file.

Preparing the message. Generate the document in memory, create the message and attachment, and send it without leaving a temporary file on the server.
$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();


The viewer prepares the exported attachment and recipient; in onEmailReport you supply the SMTP settings and send the message, returning a result to the viewer.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.