Back to Devexpress

ExportOptions.Email Property

corelibraries-devexpress-dot-xtraprinting-dot-exportoptions-948dfeaa.md

latest3.3 KB
Original Source

ExportOptions.Email Property

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

Declaration

csharp
public EmailOptions Email { get; }
vb
Public ReadOnly Property Email As EmailOptions

Property Value

TypeDescription
EmailOptions

Email export options.

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to Email
Cross-Platform Class LibraryPrintingSystemBase

.ExportOptions .Email

| | .NET Reporting Tools | XtraReport |

.ExportOptions .Email

| | DocumentOperationRequest |

.ExportOptions .Email

|

Remarks

Use this property to specify parts of an email message before you sent it in Print Preview.

Example

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.

csharp
// 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();
vb
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

ExportOptions Class

ExportOptions Members

DevExpress.XtraPrinting Namespace