1<?php
2/**
3 * DokuWiki Plugin smtp (Helper Component)
4 *
5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6 * @author  Andreas Gohr <andi@splitbrain.org>
7 */
8
9// must be run within Dokuwiki
10if(!defined('DOKU_INC')) die();
11
12class helper_plugin_smtp extends DokuWiki_Plugin {
13
14    /**
15     * Return a string usable as EHLO message
16     *
17     * @param string $ehlo configured EHLO (ovverrides automatic detection)
18     * @return string
19     */
20    static public function getEHLO($ehlo='') {
21        if(empty($ehlo)) {
22            $ehlo = !empty($_SERVER["SERVER_ADDR"]) ? "[" . $_SERVER["SERVER_ADDR"] . "]" : "localhost.localdomain";
23        }
24        return $ehlo;
25    }
26
27}
28
29// vim:ts=4:sw=4:et:
30