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.v20.1.Core.dll

Declaration

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

Property Value

Type Description
EmailOptions

Email export options.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to Email
Cross-Platform Class Library RemotePrintingSystem
.ExportOptions.Email
PrintingSystemBase
.ExportOptions.Email
WinForms Controls PrintingSystem
.ExportOptions.Email
XtraSchedulerReport
.ExportOptions.Email
WPF Controls PrintingSystem
.ExportOptions.Email
PrintingSystem
.ExportOptions.Email
Reporting XtraReport
.ExportOptions.Email
DocumentOperationRequest
.ExportOptions.Email
Silverlight Controls PrintingSystem
.ExportOptions.Email
PrintingSystem
.ExportOptions.Email

Remarks

Use this property to specify how the current document is sent by e-mail in Print Preview.

Example

The code sample below creates a simple report, specifies options to email the report, and displays the report in Print Preview.

using System;
using System.Windows.Forms;
using System.Threading;
using DevExpress.XtraReports.UI;
using System.Net.Mail;
// ...
// Create a simple report.
XtraReport report = new XtraReport() {
    Name = "SimpleReport",
    Bands = {
        new DetailBand() {
            Controls = {
                new XRLabel() {
                    Text = "Simple Report"
                }
            }
        }
    }
};
// Configure an SMTP client.
SmtpClient client = new SmtpClient("mail.smtpclient.test", 25) {
    Credentials = new System.Net.NetworkCredential("username", "password"),
    EnableSsl = true
};
// Specify export options.
report.ExportOptions.Email.Body = "Please see the report attached.";
// Display the report's Preview.
report.ShowPreview();
See Also