Caché Web Applications Tutorial
Calling the SendEmail Method
[Home] [Back] [Next]
InterSystems: The power behind what matters   

We're going to call a new method named SendEmail, passing it the e-mail address and the message we want to send.

Let's take a look at this method which is defined (you guessed it) in the Utils class.
ClassMethod OnPage() As %Status
    If ($D(%session.Data("Order"))) {
        Do ..CompleteOrder()

        Write "Thank you for using Caché Cinema!<br>",!
        If ($G(%request.Data("OrderEmail",1)) '= "") {
            Do ..SendEmail(%request.Data("OrderEmail",1),
                    "Your tickets have been ordered")
    Else {
        Write "Your order expired before it was completed."
    Quit $$$OK

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA