public function send_notification($content, $headline = NULL, $replace = array(), $force = false, $file = 'notification.html')
 {
     if (is_null($headline)) {
         $headline = $this->subject;
     }
     $template = mymail_option('default_template');
     if ($template) {
         require_once MYMAIL_DIR . '/classes/templates.class.php';
         $template = new mymail_templates($template, $file);
         $this->content = $template->get(true, true);
     } else {
         $this->content = $headline . '<br>' . $content;
     }
     require_once MYMAIL_DIR . '/classes/placeholder.class.php';
     $placeholder = new mymail_placeholder($this->content);
     $placeholder->add(array('subject' => $this->subject, 'preheader' => $headline, 'headline' => $headline, 'content' => $content));
     $placeholder->add($replace);
     $this->content = $placeholder->get_content();
     $placeholder->set_content($this->subject);
     $this->subject = $placeholder->get_content();
     $this->prepare_content();
     $this->add_tracking_image = false;
     $this->embed_images = mymail_option('embed_images');
     $success = $this->send($force);
     $this->close();
     return $success;
 }
 private function get_template_by_slug($slug, $file = 'index.html', $modules = true, $editorstyle = false)
 {
     require_once MYMAIL_DIR . '/classes/templates.class.php';
     $template = new mymail_templates($slug, $file);
     $html = $template->get($modules, true);
     if ($editorstyle) {
         $html = str_replace('</head>', '<link rel="stylesheet" href="' . MYMAIL_URI . '/assets/css/editor-style.css?ver=' . MYMAIL_VERSION . '" type="text/css" media="all"></head>', $html);
     }
     return $html;
 }