Sending query results in an email

You can email query results using the Internet Mail Wizard.

About this task

This task describes how to send query results in an email.


  1. With a set of query results in active editor, select File > Send To > Mail Recipient...
    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.

  2. Select from the file types that display and click Next.
    • 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)
    The second page of the Export Query Results wizard opens.
  3. 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.
  4. 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.
  5. 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.
    1. 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.
    2. 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 OK to close the SMTP Settings window.
  6. Click Next to add another attachment
  7. Click Click here to add new file label
  8. 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>
Where 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:
<img src=”cid:chartx.gif”></img>

  1. Click Finish to send the message.