A report can be exported in memory and sent as an e-mail attachment — the SMTP settings stay on the server, never reaching the client.

Configure sending in the email event.
def emailReport(args: StiEmailEventArgs):
    args.settings.fromAddr = 'mail.sender@stimulsoft.com'
    args.settings.host = 'smtp.stimulsoft.com'
    args.settings.port = 456
    args.settings.login = '********'
    args.settings.password = '********'
    return 'The Email has been sent successfully.'

viewer.options.toolbar.showSendEmailButton = True
viewer.onEmailReport += emailReport

How it works. The document is built and mailed server-side, so recipients get the attachment while the mail credentials stay private.

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