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

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.
—TicketConfirm.OnPage—
ClassMethod OnPage() As %Status
{
    &html<<html>
    <head>
    </head>
    <body>>
    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."
    }
    &html<</body>
    </html>>
    Quit $$$OK
}


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