Use generic getter for current user's email; also works in framework without session and user database record
This commit is contained in:
parent
c7303ed5d7
commit
38e622023a
1 changed files with 4 additions and 4 deletions
|
@ -775,9 +775,9 @@ class kolab_storage_folder
|
|||
$part_id = 1;
|
||||
$encoding = $binary ? 'binary' : 'base64';
|
||||
|
||||
if ($ident = $rcmail->user->get_identity()) {
|
||||
$headers['From'] = $ident['email'];
|
||||
$headers['To'] = $ident['email'];
|
||||
if ($user_email = $rcmail->get_user_email()) {
|
||||
$headers['From'] = $user_email;
|
||||
$headers['To'] = $user_email;
|
||||
}
|
||||
$headers['Date'] = date('r');
|
||||
$headers['X-Kolab-Type'] = kolab_format::KTYPE_PREFIX . $type;
|
||||
|
@ -819,7 +819,7 @@ class kolab_storage_folder
|
|||
false, // is_file
|
||||
'8bit', // encoding
|
||||
'attachment', // disposition
|
||||
RCUBE_CHARSET // charset
|
||||
RCUBE_CHARSET // charset
|
||||
);
|
||||
$part_id++;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue