xref: /plugin/smtp/admin.php (revision 4dc22474951ab24d4689b882faa867e66a266a57)
1*4dc22474SAndreas Gohr<?php
2*4dc22474SAndreas Gohr/**
3*4dc22474SAndreas Gohr * DokuWiki Plugin smtp (Admin Component)
4*4dc22474SAndreas Gohr *
5*4dc22474SAndreas Gohr * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6*4dc22474SAndreas Gohr * @author  Andreas Gohr <andi@splitbrain.org>
7*4dc22474SAndreas Gohr */
8*4dc22474SAndreas Gohr
9*4dc22474SAndreas Gohr// must be run within Dokuwiki
10*4dc22474SAndreas Gohrif(!defined('DOKU_INC')) die();
11*4dc22474SAndreas Gohr
12*4dc22474SAndreas Gohrclass admin_plugin_smtp extends DokuWiki_Admin_Plugin {
13*4dc22474SAndreas Gohr
14*4dc22474SAndreas Gohr    /**
15*4dc22474SAndreas Gohr     * @return int sort number in admin menu
16*4dc22474SAndreas Gohr     */
17*4dc22474SAndreas Gohr    public function getMenuSort() {
18*4dc22474SAndreas Gohr        return 500;
19*4dc22474SAndreas Gohr    }
20*4dc22474SAndreas Gohr
21*4dc22474SAndreas Gohr    /**
22*4dc22474SAndreas Gohr     * @return bool true if only access for superuser, false is for superusers and moderators
23*4dc22474SAndreas Gohr     */
24*4dc22474SAndreas Gohr    public function forAdminOnly() {
25*4dc22474SAndreas Gohr        return false;
26*4dc22474SAndreas Gohr    }
27*4dc22474SAndreas Gohr
28*4dc22474SAndreas Gohr    /**
29*4dc22474SAndreas Gohr     * Should carry out any processing required by the plugin.
30*4dc22474SAndreas Gohr     */
31*4dc22474SAndreas Gohr    public function handle() {
32*4dc22474SAndreas Gohr    }
33*4dc22474SAndreas Gohr
34*4dc22474SAndreas Gohr    /**
35*4dc22474SAndreas Gohr     * Render HTML output, e.g. helpful text and a form
36*4dc22474SAndreas Gohr     */
37*4dc22474SAndreas Gohr    public function html() {
38*4dc22474SAndreas Gohr        ptln('<h1>'.$this->getLang('menu').'</h1>');
39*4dc22474SAndreas Gohr
40*4dc22474SAndreas Gohr
41*4dc22474SAndreas Gohr        require_once __DIR__.'/Mailer/Mailer/SMTP.php';
42*4dc22474SAndreas Gohr        $mailer = new Tx\Mailer\SMTP();
43*4dc22474SAndreas Gohr        $mailer->setServer()
44*4dc22474SAndreas Gohr
45*4dc22474SAndreas Gohr    }
46*4dc22474SAndreas Gohr}
47*4dc22474SAndreas Gohr
48*4dc22474SAndreas Gohr// vim:ts=4:sw=4:et:
49