Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

NuGet Package: DevExpress.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.

View Example: Reporting for WinForms - How to Use MailKit to Email a Report

See Also