public function handleCompletion()
    {
        $member = $this->User;

        if ($member && $member->exists()) {
            $email = new Email();
            $email->setTo($member->Email);
            $email->setSubject('A deletion task requested by you has completed.');

            $message = sprintf('<p>Hi, %s</p>', $member->getTitle());
            $message .= sprintf('<p>Job %s has completed.</p>', $this->Title);
            $message .= sprintf('<p>%s records have been deleted.</p>', $this->totalSteps);
            $email->setBody($message);

            return $email->send();
        }
    }
public function handleCompletion()
    {
        $member = $this->User;

        if ($member && $member->exists()) {
            $email = new Email();
            $email->setTo($member->Email);
            $email->setSubject('A deletion task requested by you has completed.');

            $message = sprintf('<p>Hi, %s</p>', $member->getTitle());
            $message .= sprintf('<p>Job %s has completed.</p>', $this->Title);
            $message .= sprintf('<p>%s records have been deleted.</p>', $this->totalSteps);
            $email->setBody($message);

            return $email->send();
        }
    }
public function handleCompletion ( ) { $ member = $ this -> User ; if ( $ member && $ member -> exists ( ) ) { $ email = new Email ( ) ; $ email -> setTo ( $ member -> Email ) ; $ email -> setSubject ( 'A deletion task requested by you has completed.' ) ; $ message = sprintf ( '<p>Hi, %s</p>' , $ member -> getTitle ( ) ) ; $ message .= sprintf ( '<p>Job %s has completed.</p>' , $ this -> Title ) ; $ message .= sprintf ( '<p>%s records have been deleted.</p>' , $ this -> totalSteps ) ; $ email -> setBody ( $ message ) ; return $ email -> send ( ) ; } }
Send an email to the supplied user
upon completion
Send an email to the supplied user upon completion