<?php

/*
  MailBeez Automatic Trigger Email Campaigns
  http://www.mailbeez.com

  Copyright (c) 2010 MailBeez

  inspired and in parts based on
  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
 */

// make path work from admin
require_once(MH_DIR_FS_CATALOG . MH_ROOT_PATH . 'common/classes/mailbeez.php');

class mailbeez_phpmailer_test extends mailbeez
{

    // class constructor
    function __construct()
    {
        // call constructor
        parent::__construct();

        // set some stuff:
        $this->code = 'mailbeez_phpmailer_test';
        $this->module = 'mailbeez_phpmailer_test';
        $this->version = '2.2'; // float value
        $this->required_mb_version = 2.5; // required mailbeez version
        $this->iteration = 1;
        $this->title = 'SMTP Test';
        $this->description = 'SMTP Test';
        $this->sort_order = 1100;
        $this->enabled = true;
        $this->sender = mh_cfg('MAILBEEZ_SMTP_SENDER');
        $this->sender_name = 'MailBeez Test';
        $this->allow_preview = false;
        $this->allow_reporting = false;
        $this->allow_timing = false;
        $this->allow_filter_check = false;

        $this->documentation_key = $this->module; // leave empty if no documentation available

        $this->htmlBodyTemplateResource = 'body_html.tpl'; // located in folder of this module
        $this->txtBodyTemplateResource = 'body_txt.tpl'; // located in folder of this module
        $this->subjectTemplateResource = 'subject.tpl'; // located in folder of this module

        $this->do_run = false;
        $this->is_editable = false;
        $this->is_configurable = false;
        $this->is_removable = false;
        $this->hidden = true;

    }


// class methods
    function getAudience()
    {
        return false;
    }

    function check()
    {
        return true;
    }

    // installation methods

    function keys()
    {
        return false;
    }

    function install()
    {
    }


    function get_do_run()
    {
        //run only if called explicit
        if (isset($_REQUEST['module']) && $_REQUEST['module'] == $this->module) {
            return true;
        }
        return false;
    }


}

