Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP SQL Anywhere, on-demand edition 1.0 SP 6 » Task syntax

SendDistributionEmail task

Sends an email to one or more email addresses.

Syntax 1 (SQL)
CALL DBCloud.SendDistributionEmail ( to_address=to_address, subject=subject, body=body [, optional-parameters ] )
Syntax 2 (Cloud Command utility)
dbcloudcmd run SendDistributionEmail to_address subject body [ optional-parameters ]
  • to_address

    The recipient email addresses, separated by semicolons. (Required)

  • subject

    The subject of the email. (Required)

  • body

    The body of the email. (Required)

  • attachment_file

    The file name and path of a file to attach from the host file system. The default is NULL.

  • content_type

    The MIME Content-Type of the email body. The default is 'text/plain'.

  • timeout_in_sec

    The timeout in seconds. The default is 60.

  • character_set

    The character set of the supplied subject and body. The default is db_property('charset').

  • host

    The host where the email will be sent from. Accepts a search query that identifies one host, for example a host name or ID. The default is DBCloud.F_CurrentHost().

Required privileges



This task sends an email to one or more email addresses.

Your cloud must have email enabled and configured for this task to succeed. You can enable or change the email server by using the AlterCloud task.

To send emails to cloud users by specifying the cloud user name, use the SendUserEmail task.


The following task sends an email to a single email address:

dbcloudcmd run SendDistributionEmail subject="Test subject" body="This is the body of the email"

The following task sends an email with an HTML body and an attachment to multiple email addresses:

dbcloudcmd run SendDistributionEmail to_address=";" subject="More complex example" body="
     <h1>The heading of the email body</h1>
     <p>A paragraph within the email body.</p>" attachment_file="c:\myfile.txt" content_type="text/html"