14dc22474SAndreas Gohr<?php 24dc22474SAndreas Gohr/** 34dc22474SAndreas Gohr * DokuWiki Plugin smtp (Helper Component) 44dc22474SAndreas Gohr * 54dc22474SAndreas Gohr * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html 64dc22474SAndreas Gohr * @author Andreas Gohr <andi@splitbrain.org> 74dc22474SAndreas Gohr */ 84dc22474SAndreas Gohr 94dc22474SAndreas Gohr// must be run within Dokuwiki 104dc22474SAndreas Gohrif(!defined('DOKU_INC')) die(); 114dc22474SAndreas Gohr 124dc22474SAndreas Gohrclass helper_plugin_smtp extends DokuWiki_Plugin { 134dc22474SAndreas Gohr 14*27827474SAndreas Gohr /** 15*27827474SAndreas Gohr * Return a string usable as EHLO message 16*27827474SAndreas Gohr * 17*27827474SAndreas Gohr * @param string $ehlo configured EHLO (ovverrides automatic detection) 18*27827474SAndreas Gohr * @return string 19*27827474SAndreas Gohr */ 20*27827474SAndreas Gohr static public function getEHLO($ehlo='') { 21*27827474SAndreas Gohr if(empty($ehlo)) { 22*27827474SAndreas Gohr $ehlo = !empty($_SERVER["SERVER_ADDR"]) ? "[" . $_SERVER["SERVER_ADDR"] . "]" : "localhost.localdomain"; 23*27827474SAndreas Gohr } 24*27827474SAndreas Gohr return $ehlo; 25*27827474SAndreas Gohr } 264dc22474SAndreas Gohr 274dc22474SAndreas Gohr} 284dc22474SAndreas Gohr 294dc22474SAndreas Gohr// vim:ts=4:sw=4:et: 30