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.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.