Sending query results in an email
You can email query results using the Internet Mail Wizard.
This task describes how to send query results in an email.
About this task
- With a set of query results in active editor, select
Note: If your query contains several result sets, only the currently active display mode is sent.
The Export Query Results wizard opens with the Select an export file type page.
- Select from the file types that display and click Next.
The second page of the Export Query Results wizard opens.
- Avro - Apache Avro (*.avro)
- Text - Delimited Text (*.txt)
- HTML – Hypertext Markup Language (*.htm)
- IXF - Integrated Exchange Format (*.ixf)
- CSV – Comma-separated values (*.csv)
- DBF - dbase III (*.dbf)
- XML - QMF Markup Language file (*.xml)
- WQML - Web Query Markup Language (*.wqml)
- Parquet - Apache Parquet (*.parquet)
- PDF - Portable Document Format (*.pdf)
- XLS - Microsoft Excel 97-2003 (*.xls)
- XLSX - Microsoft Excel 2007 (*.xlsx)
- Select additional options for the file type and click Finish.
Note: Available options depend on the file type you have selected. For more information, see Specifying file export options.The Internet Mail Wizard opens.
- On Message parameters page, specify
values for the following parameters:
- Select the format of the body text from the Format list. The available formats are Text and HTML.
- The address to that the email must be sent in the To field.
- The address to that a carbon copy of the email must be sent in the Cc field.
- The subject of the email in the Subject field.
- The body text of the email in the Message field.
- The address from that the email must be sent in the From field.
- To specify SMTP server
parameters, click SMTP Settings. In the SMTP
Settings window, specify whether to use the server that
is predefined by administrator or a custom one.
Click OK to close the SMTP Settings window.
- If you decide to use a predefined SMTP server, select the server from the list of predefined servers or click Add Server to create one.
- If you decide to use a custom server,
specify server parameters: its address and port number. If the SMTP
server requires authentication, select Use SMTP authentication,
and then specify user name and password. If it is necessary to specify
extra access preferences, click Advanced to
open the Advanced SMTP Settings window where
you can add keywords that are supported by
javamail. Click OK.
- Click Next to add another attachment
- Click Click here to add new file label
- Click the ellipsis (…) and select the necessary file from your hard disk drive.
You can attach images as well as files of other available types.
If you want to embed an image in the body text of the email, you must add the following HTML-tag to the area of the text in which you want the image to display:
<img src=”cid:[image name]”></img>
cid:[image name]identifies the image file you are embedding. For example, if you wanted to embed a .gif file named
chartx, you would insert the following HTML-tag into the text:
- Click Finish to send the message.