Using the Delivery Manager

Using the Delivery Manager Java APIs 8-3 req.addPropertyDeliveryPropertyDefinitions.SMTP_FROM, mynamemydomain.com; set the destination email address req.addProperty DeliveryPropertyDefinitions.SMTP_TO_RECIPIENTS, user1mydomain.com, user2mydomain.com ; set the content type of the email body req.addPropertyDeliveryPropertyDefinitions.SMTP_CONTENT_TYPE, applicationpdf; set the document file name appeared in the email req.addPropertyDeliveryPropertyDefinitions.SMTP_CONTENT_FILENAME, test.pdf; set the document to deliver req.setDocumentdocumenttest.pdf; submit the request req.submit; close the request req.close; The following table lists the supported properties: Table 8–1 Properties for E-Mail Delivery Property Description SMTP_TO_RECIPIENTS Required Enter multiple recipients separated by a comma example: user1mydomain.com, user2mydomain.com SMTP_CC_RECIPIENTS Optional Enter multiple recipients separated by a comma. SMTP_BCC_RECIPIENTS Optional Enter multiple recipients separated by a comma. SMTP_FROM Required Enter the e-mail address of the sending party. SMTP_REPLY_TO Optional Enter the reply-to e-mail address. SMTP_SUBJECT Required Enter the subject of the e-mail. SMTP_CHARACTER_ ENCODING Optional Default is UTF-8. SMTP_ATTACHMENT Optional If you are including an attachment, enter the attachment object name. SMTP_CONTENT_ FILENAME Optional Enter the file name of the attachment example: invoice.pdf SMTP_CONTENT_ DISPOSITION Content disposition of the attachment. Value should be either inline or attachment. Default is attachment. SMTP_CONTENT_TYPE Required Enter the MIME type. 8-4 Developers Guide for Oracle Business Intelligence Publisher

8.2.1 Defining Multiple Recipients

The e-mail delivery server channel supports multiple documents and multiple destinations per request. The following example demonstrates multiple TO and CC addresses: Example 8–2 Sample Code for Defining Multiple Recipients set the TO email addresses req.addProperty DeliveryPropertyDefinitions.SMTP_TO_RECIPIENTS, user1mydomain.com, user2mydomain.com, user3mydomain.com; set the CC email addresses req.addProperty DeliveryPropertyDefinitions.SMTP_CC_RECIPIENTS, user4mydomain.com, user5mydomain.com, user6mydomain.com;

8.2.2 Attaching Multiple Documents to One Request

Use the Attachment utility class oracle.apps.xdo.delivery.smtp.Attachment to attach multiple documents into one request. Sample usage is as follows: SMTP_SMTP_HOST Required Enter the SMTP host name. SMTP_SMTP_PORT Optional Enter the SMTP port. Default is 25. SMTP_SECURE_ CONNECTION This property controls secure connection method to use. Valid values are: ■ none - default ■ tls - use STARTTLS when server supports the command. ■ tls_required - use STARTTLS and abort if server does not support the command. ■ ssl - for Secure Sockets Layer SMTP_SMTP_ USERNAME Optional If the SMTP server requires authentication, enter your username for the server. SMTP_SMTP_PASSWORD Optional If the SMTP server requires authentication, enter the password for the username you entered. SMTP_ATTACHMENT_ FIRST Optional If your e-mail contains an attachment and you want the attachment to appear first, enter true. If you do not want the attachment to appear first, enter false. Table 8–1 Cont. Properties for E-Mail Delivery Property Description