corelibraries-devexpress-dot-xtraprinting-dot-exportoptions-948dfeaa.md
Gets the settings used to specify exporting parameters when a document is sent by e-mail in Print Preview.
Namespace : DevExpress.XtraPrinting
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
public EmailOptions Email { get; }
Public ReadOnly Property Email As EmailOptions
| Type | Description |
|---|---|
| EmailOptions |
Email export options.
|
You can access this nested property as listed below:
| Library | Object Type | Path to Email |
|---|---|---|
| Cross-Platform Class Library | PrintingSystemBase |
.ExportOptions .Email
| | .NET Reporting Tools | XtraReport |
.ExportOptions .Email
| | DocumentOperationRequest |
.ExportOptions .Email
|
Use this property to specify parts of an email message before you sent it in Print Preview.
The code sample below creates a simple report, specifies the Subject and Body parts of an email message, and displays the report in Print Preview.
// Creates a simple report.
XtraReport report = new XtraReport()
{
Name = "SimpleReport",
Bands = {
new DetailBand() {
Controls = {
new XRLabel() {
Text = "Simple Report"
}
}
}
}
};
// Specifies mail options.
report.ExportOptions.Email.Body = "Please see the report attached.";
report.ExportOptions.Email.Subject = $"The {report.Name} report is sent upon your request.";
// Displays the report in the Print Preview.
report.ShowPreview();
Imports DevExpress.XtraReports.UI
' Creates a simple report.
Dim report = New XtraReport()
Dim band = New DetailBand()
Dim control1 = New XRLabel() With {
.Name = "Label1",
.Text = "Simple Report"
}
band.Controls.AddRange(New XRControl() {control1})
report.Bands.Add(band)
' Specifies mail options.
report.ExportOptions.Email.Body = "Please see the report attached."
report.ExportOptions.Email.Subject = $"The {report.Name} report is sent upon your request."
' Displays the report in the Print Preview.
report.ShowPreview()
See Also