Skip to main content

Calling the SendEmail Method

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
FeedbackOpens in a new tab