public function sendReservation()
    {
        // Get the mail sender or fallback to the admin email
        if (($from = self::config()->get('mail_sender')) && empty($from)) {
            $from = Config::inst()->get('Email', 'admin_email');
        }

        // Create the email with given template and reservation data
        $email = new Email();
        $email->setSubject(_t(
            'ReservationMail.TITLE',
            'Your order at {sitename}',
            null,
            array(
                'sitename' => SiteConfig::current_site_config()->Title
            )
        ));
        $email->setFrom($from);
        $email->setTo($this->MainContact()->Email);
        $email->setTemplate('ReservationMail');
        $email->populateTemplate($this);
        $this->extend('updateReservationMail', $email);
        return $email->send();
    }
public function sendReservation()
    {
        // Get the mail sender or fallback to the admin email
        if (($from = self::config()->get('mail_sender')) && empty($from)) {
            $from = Config::inst()->get('Email', 'admin_email');
        }

        // Create the email with given template and reservation data
        $email = new Email();
        $email->setSubject(_t(
            'ReservationMail.TITLE',
            'Your order at {sitename}',
            null,
            array(
                'sitename' => SiteConfig::current_site_config()->Title
            )
        ));
        $email->setFrom($from);
        $email->setTo($this->MainContact()->Email);
        $email->setTemplate('ReservationMail');
        $email->populateTemplate($this);
        $this->extend('updateReservationMail', $email);
        return $email->send();
    }
public function sendReservation ( ) { // Get the mail sender or fallback to the admin email if ( ( $ from = self :: config ( ) -> get ( 'mail_sender' ) ) && empty ( $ from ) ) { $ from = Config :: inst ( ) -> get ( 'Email' , 'admin_email' ) ; } // Create the email with given template and reservation data $ email = new Email ( ) ; $ email -> setSubject ( _t ( 'ReservationMail.TITLE' , 'Your order at {sitename}' , null , array ( 'sitename' => SiteConfig :: current_site_config ( ) -> Title ) ) ) ; $ email -> setFrom ( $ from ) ; $ email -> setTo ( $ this -> MainContact ( ) -> Email ) ; $ email -> setTemplate ( 'ReservationMail' ) ; $ email -> populateTemplate ( $ this ) ; $ this -> extend ( 'updateReservationMail' , $ email ) ; return $ email -> send ( ) ; }
Send the reservation mail

@return mixed
Send the reservation mail