Specifying export query to mail operation options

You use the export query to mail operation to send query results in an email.

About this task

To add an export query to mail operation to an action:

Procedure

  1. Open the Specify operations page of the Action Wizard and click Add Operation.
    The Operation Wizard opens.
  2. Click Export query to mail and then click Next.
    The Specify export parameters page opens.
  3. Select the necessary result set number in the Result set field.
  4. Select the necessary display mode from the Display mode list if several of them are available.
  5. Select the file type that you want to export from the Export type drop-down list.
    Valid file types are:
    • Avro (*.avro)
    • Text (*.txt)
    • CSV (*.csv)
    • Parquet (*.parquet)
    • PDF (*.pdf)
    • HTML (*.html)
    • IXF (*.ixf)
    • XML Extensible Markup Language file (*.xml)
    • XLS Microsoft Excel 97-2003 (*.xls)
    • XLSX Microsoft Excel 2007 (*.xlsx)
    • PNG (*.png)
  6. Specify the name of the file attachment in the email in the Attachment name field.
  7. If you want to specify a conditional file attachment name, click the button next to the field.
    The Formula editor opens.
  8. Specify the formula to use to determine the name of the attachment and click OK.
    The Formula editor closes.
  9. Click Next.

    The Specify [file type] export options page opens. On this page you can select additional options that are available depending on the type of file that you are creating.

    Click Next.

  10. Specify email settings on the next page of the Operation wizard.
    Note: The values that you set for can be specified dynamically during Iterator work with the help of substitution variables. You can use an action group with Iterator to send separate email messages to several recipients. To do so you need to specify Iterator query that returns all necessary email information, define Iterator variables, and type the variable names in the corresponding fields on the Specify mail settings page using the equality sign (=Form, =SMTP).

    When you run the task, Iterator goes over the Iterator query records, extracts a set of email parameters at each iteration, and passes it to the Export query to mail operation.

    • From the Format list, select the format of the body text. The available formats are Text and HTML.
    • Specify the recipient’s email address in the To field.
    • Specify additional recipients in the Cc field.
    • Specify the subject of the email in the Subject field.
    • Specify the content of the email in the Message field.
      Note:
      If you want to include an embedded image in the text of the email, you must insert the following HTML snippet into the text:
      <img src=”cid:[image name]”></img>
      where cid: is the standard abbreviated content identifier required when referencing an embedded image within a formatted email, and where [image name] is the name of the image file. For example, to embed an image file named image1.png, you would insert the following HTML snippet into the text of the email:
      <img src=”cid:image1.png”></img>
    • Specify the email address from which the email is sent in the From field.
  11. To specify SMTP server parameters, click SMTP settings. In the SMTP Settings window, specify whether to use a server predefined by administrator or a custom one.
    1. If you decide to use a predefined SMTP server, select the required 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 including 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 additional access preferences, click Advanced to open the Advanced SMTP Settings window where you can add required keywords supported by javamail. Click OK.
    Click OK to close the SMTP Settings window.
  12. Click Finish to close the Operation wizard.