Skip to main content
A newer version of this page is available. .

XtraReport.ExportToMail(MailMessageExportOptions) Method

Exports a report to HTML and inserts it into a specified e-mail message.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.1.dll

NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Reporting.Core

Declaration

public AlternateView ExportToMail(
    MailMessageExportOptions options = null
)

Optional Parameters

Name Type Default Description
options MailMessageExportOptions null

The mail message export options.

Returns

Type Description
AlternateView

A AlternateView object.

Remarks

Once the document export has started, it will run until the resulting document is complete and cannot be interrupted or canceled in the process.

Use the ExportToMailAsync(MailMessageExportOptions, CancellationToken) method instead of ExportToMail to export a report asynchronously in a separate task.

Note

The complete sample project How to send a report as HTML in an email body is available in the DevExpress Examples repository.

See Also