Sending the report by email

Top  Previous 

FastReport allows you to send a prepared report by email. It may work in two modes:

 

Mode

Description

SMTP

This is default mode. To send an email, you don't need any external programs.

MAPI

You may turn on this mode programmatically. To do this, set Config.EmailSettings.UseMAPI = true, or, if  you use EnvironmentSettings component, set its EnvironmentSettings.EmailSettings.UseMAPI property to true.

 

To send an email, FastReport uses the default email client such as Outlook Express. This client must support the MAPI protocol.

 

To send an email, you need to specify a recipient's email address. Also you need to specify the subject and email body, but this is not required. At the bottom of the dialog, select the format of your report - it will be attached to the message:

 

sendemail1

 

If you use the SMTP mode, you need to set up an account. It is necessary to do only once. Once you have done it, FastReport will save the parameters in the configuration file. The parameters can be found on the "Account" tab. All obligatory fields are marked by red asterisk:

 

sendemail2

 

If your host server requires an authentication, you need to fill in "User name" and "Password" fields as well.