Hi Sanjeev,
If you have already created the instances of email:Message, then you can
simply send them like this:
<sml:SendEMails/>
The module will take the instances from the current graph context and send
them using the SMTP server parameters set up in Server Administration.
If you need a more complete example, EDG uses this module internally to
send notifications. For example, when using the Tasks feature, there is a
ui:Method called whenever a change is made to a task:
<ui:setContext ui:queryGraph=\"{= IRI(CONCAT(str(ui:tempGraph),
ui:uniqueId())) }\">
<ui:update ui:updateQuery=\"{!
INSERT {
?message a email:Message .
?message email:subject ?subject .
?message email:body ?body .
?message email:from ?from .
?message email:to ?to .
?from email:address ?sender .
?to a email:Address .
?to email:address ?email .
}
WHERE {
BIND (BNODE() AS ?message) .
BIND (BNODE() AS ?from) .
BIND (BNODE() AS ?to) .
BIND (CONCAT("[TopBraid Tasks] Update: ", ?title)
AS ?subject) .
BIND (CONCAT(?header, ?text) AS ?body) .
BIND (teamwork:getFromAddress() AS ?fromAddress) .
BIND (COALESCE(?fromAddress, "[email protected]")
AS ?sender) .
} }\"/>
<sml:SendEMails/>
</ui:setContext>
Hope this helps!
On Wednesday, November 6, 2019 at 8:54:04 AM UTC-5, Sanjeev Devireddy wrote:
>
> Hi,
>
> Is there any example project/document on how to use sml:SendEMails
> module to send email notifications using the instances of email:Message?
>
>
> Thanks,
> Sanjeev
>
--
You received this message because you are subscribed to the Google Groups
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/37453f9c-5724-448c-958f-36e16ea37de6%40googlegroups.com.