[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Collapse]Reporting
 [Expand]Product Information
 [Expand]Get Started with DevExpress Reporting
 [Expand]Create Popular Reports
 [Collapse]Detailed Guide to DevExpress Reporting
   Introduction to Banded Reports
  [Expand]Provide Data to Reports
  [Expand]Use Report Controls
  [Expand]Shape Report Data
   Arrange Dynamic Report Contents
  [Expand]Customize Appearance
  [Expand]Add Navigation
  [Expand]Provide Interactivity
  [Expand]Add Extra Information
  [Expand]Merge Reports
  [Expand]Use Expressions
  [Collapse]Store and Distribute Reports
    Reporting Security
   [Expand]Store Report Layouts and Documents
   [Expand]Globalize and Localize Reports
   [Collapse]Export Reports
     Document Export Overview
     Export Large Reports
     Email Reports
     Export to MailMessage
     Export to PDF
     Export to DOCX
     Export to RTF
     Export to Image
     Export to CSV
     Export to Text
     Export to XLS
     Export to XLSX
     Export to HTML
     Export to MHT
     Export to PPT
    Print Reports
  [Expand]Reporting API
 [Expand]Visual Studio Report Designer
 [Expand]Create End-User Reporting Applications
 [Expand]API Reference
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Email Reports

This document describes the main capabilities for sending an exported report by e-mail automatically.

Tip

A code example illustrating how to e-mail a report is available at How to dynamically send a report via e-mail as a PDF.

To export a report to a System.Net.Mail.MailMessage object containing an HTML representation of report contents, use the XtraReport.ExportToMail method. After a mail message is generated, you can initialize System.Net.Mail.SmtpClient and call its SmtpClient.Send method to send the message.

To control how the current document is exported and sent via e-mail from the Print Preview, use the ExportOptions.Email property that returns a EmailOptions class descendant.

The EmailOptions class provides functionality for sending the exported report to several recipients. The EmailOptions.AdditionalRecipients property provides access to the collection of email recipients. This property returns a RecipientCollection object.

The following properties and methods are exposed by the RecipientCollection class.

To add or insert a new recipient to the AdditionalRecipients collection, use the EmailOptions.AddRecipient or EmailOptions.InsertRecipient methods, respectively. These methods take a Recipient as input.

The Recipient class is used to contain the recipient settings. The following properties exposed by this class allow you to customize the main recipient settings.

Expanded See Also

Is this topic helpful?​​​​​​​