({{, (RefLink[DeliveryFunction, paclet:ref/DeliveryFunction]) 
is an option that specifies how material such as documents generated by (RefLink[DocumentGenerator, paclet:ref/DocumentGenerator]) should be delivered.}})

OpenersNotesSection(Spacer1)Details

Possible settings for (RefLink[DeliveryFunction, paclet:ref/DeliveryFunction]) include:

Except with DeliveryFunction->f, standard material is added to messages sent.

Possible channels "chan" are as used by (RefLink[SendMessage, paclet:ref/SendMessage]).

Typical delivery formats include:

With DeliveryFunction->f, the function f is applied to an association containing the following elements:

If the document generator is unnamed, "GeneratorFilename" is (RefLink[None, paclet:ref/None]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Deploy a generator that emails its creator a PDF of the generated document:

co=CloudDeploy[DocumentGenerator[File["ExampleData/BasicTemplate.nb"],<|"author"->$WolframID|>,"Daily",
DeliveryFunction->"PDF"
]]

Trigger the generator to run asynchronously:

TaskExecute[co]

Redeploy the generator with a custom notification function:

CloudDeploy[DocumentGenerator[File["ExampleData/BasicTemplate.nb"],<|"author"->$WolframID|>,"Daily",
DeliveryFunction->(SendMail[
StringTemplate["CPU duty cycle for task `1` is `2`"][#["GeneratorCloudObject"],#["Timing"]/#["AbsoluteTiming"]]
]&),
NotificationFunction->All
],co]

Trigger the generator to run again:

TaskExecute[co]

Delete the generator:

TaskRemove[co]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[NotificationFunction, paclet:ref/NotificationFunction])  ▪  (RefLink[SendMail, paclet:ref/SendMail])  ▪  (RefLink[SendMessage, paclet:ref/SendMessage])  ▪  (RefLink[StringTemplate, paclet:ref/StringTemplate])  ▪  (RefLink[NotebookTemplate, paclet:ref/NotebookTemplate])}})}})