Merge branch 'seeddms-5.0.x' into seeddms-5.1.x

This commit is contained in:
Uwe Steinmann 2017-05-02 21:02:00 +02:00
commit 9801f5e481
2 changed files with 9 additions and 18 deletions

View File

@ -82,10 +82,15 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
return false;
}
$returnpath = '';
if(is_object($sender) && !strcasecmp(get_class($sender), $this->_dms->getClassname('user'))) {
$from = $sender->getFullName() ." <". $sender->getEmail() .">";
if($this->from_address)
$returnpath = $this->from_address;
} elseif(is_string($sender) && trim($sender) != "") {
$from = $sender;
if($this->from_address)
$returnpath = $this->from_address;
} else {
$from = $this->from_address;
}
@ -96,6 +101,8 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
$headers = array ();
$headers['From'] = $from;
if($returnpath)
$headers['Return-Path'] = $returnpath;
$headers['To'] = $to;
$preferences = array("input-charset" => "UTF-8", "output-charset" => "UTF-8");
$encoded_subject = iconv_mime_encode("Subject", getMLText($subject, $params, "", $lang), $preferences);
@ -125,22 +132,6 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
} else {
return true;
}
/*
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/plain; charset=utf-8";
$headers[] = "From: ". $from;
$lang = $recipient->getLanguage();
$message = getMLText("email_header", array(), "", $lang)."\r\n\r\n".getMLText($message, $params, "", $lang);
$message .= "\r\n\r\n".getMLText("email_footer", array(), "", $lang);
$subject = "=?UTF-8?B?".base64_encode(getMLText($subject, $params, "", $lang))."?=";
mail($recipient->getEmail(), $subject, $message, implode("\r\n", $headers));
return true;
*/
} /* }}} */
function toGroup($sender, $groupRecipient, $subject, $message, $params=array()) { /* {{{ */

View File

@ -746,7 +746,7 @@ if(!is_writeable($settings->_configFilePath)) {
<?php
foreach($extconf['config'] as $confkey=>$conf) {
?>
<tr title="<?php echo $conf['help'];?>">
<tr title="<?php echo isset($conf['help']) ? $conf['help'] : '';?>">
<td><?php echo $conf['title'];?>:</td><td>
<?php
switch($conf['type']) {
@ -826,7 +826,7 @@ if(!is_writeable($settings->_configFilePath)) {
break;
default:
?>
<input type="text" name="<?php echo "extensions[".$extname."][".$confkey."]"; ?>" title="<?php echo isset($conf['help']) ? $conf['help'] : ''; ?>" value="<?php if(isset($settings->_extensions[$extname][$confkey])) echo $settings->_extensions[$extname][$confkey]; ?>" size="<?php echo $conf['size']; ?>" />
<input type="text" name="<?php echo "extensions[".$extname."][".$confkey."]"; ?>" title="<?php echo isset($conf['help']) ? $conf['help'] : ''; ?>" value="<?php if(isset($settings->_extensions[$extname][$confkey])) echo $settings->_extensions[$extname][$confkey]; ?>" <?php echo isset($conf['size']) ? 'size="'.$conf['size'].'"' : ""; ?>" />
<?php
}
?>