public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this->virtualFields = array('subscriber_name' => 'CASE WHEN COALESCE(User.username, \'\') = \'\' THEN ' . $this->alias . '.prefered_name else User.username end', 'subscriber_email' => 'CASE WHEN COALESCE(User.email, \'\') = \'\' THEN ' . $this->alias . '.email else User.email end'); }
public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this->validate = array('campaign_id' => array('notEmpty' => array('rule' => 'notEmpty', 'message' => __('Please select the campaign this email belongs to'))), 'from' => array('notEmpty' => array('rule' => 'notEmpty', 'message' => __('Please enter the from address')), 'email' => array('rule' => array('email', true), 'message' => __('Please enter a valid email addres'))), 'reply_to' => array('notEmpty' => array('rule' => 'notEmpty', 'message' => __('Please enter the reply to email')), 'email' => array('rule' => array('email', true), 'message' => __('Please enter a valid email addres'))), 'subject' => array('notEmpty' => array('rule' => 'notEmpty', 'message' => __('Please enter the subject of this newsletter'))), 'html' => array('notEmpty' => array('rule' => 'notEmpty', 'message' => __('Please enter the html version of your email'))), 'text' => array('notEmpty' => array('rule' => 'notEmpty', 'message' => __('Please enter the text version of your email')))); }
public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this->validate = array('name' => array('notEmpty' => array('rule' => 'notEmpty', 'message' => __('Please enter the name of this campaign')), 'isUnique' => array('rule' => 'isUnique', 'message' => __('There is already a campaign with that name'))), 'template_id' => array('notEmpty' => array('rule' => 'notEmpty', 'message' => __('Please select the default template for this campaign')))); }
public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this->server = array('server' => Configure::read('Newsletter.smtp_host'), 'username' => Configure::read('Newsletter.smtp_username'), 'email' => Configure::read('Newsletter.smtp_username'), 'password' => Configure::read('Newsletter.smtp_password'), 'ssl' => Configure::read('Newsletter.ssl'), 'port' => Configure::read('Newsletter.port'), 'type' => Configure::read('Newsletter.type')); }
public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this->validate = array('name' => array('notEmpty' => array('rule' => 'notEmpty', 'message' => 'Please enter the name for this template'), 'isUnique' => array('rule' => 'isUnique', 'message' => 'A template with that name already exists'))); }