Skip to content

Commit

Permalink
improve mail subject for mails to the owner with the password
Browse files Browse the repository at this point in the history
Signed-off-by: Bjoern Schiessle <[email protected]>
  • Loading branch information
schiessle authored and rullzer committed Jan 13, 2019
1 parent 54093e2 commit 53ce4a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/sharebymail/lib/ShareByMailProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ protected function sendPasswordToOwner(IShare $share, $password) {
'shareWith' => $shareWith,
]);

$emailTemplate->setSubject($this->l->t('Password to access »%1$s« shared with %2$s', [$filename, $shareWith]));
$emailTemplate->setSubject($this->l->t('Password to access »%1$s« shared by you with %2$s', [$filename, $shareWith]));
$emailTemplate->addHeader();
$emailTemplate->addHeading($this->l->t('Password to access »%s«', [$filename]), false);
$emailTemplate->addBodyText($bodyPart);
Expand Down

1 comment on commit 53ce4a0

@foxbuild
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi ,

I would like to have the default expiration date also with mails.

Setting Share:
Can you do that in Nextcloud?
I've made the following changes to ShareByMailProvider.php.

Thank you
Joachim Fuchs

Sharing
Set default expiration date
Expire after
7 days

diff ShareByMailProvider.php ShareByMailProvider.php
601c601
< $emailTemplate->setSubject($this->l->t('Password to access »%1$s« shared by you with %2$s', [$filename, $shareWith]));

          $emailTemplate->setSubject($this->l->t('Password to access »%1$s« shared with %2$s', [$filename, $shareWith]));

671a672,676

          $start_date = date("Y-m-d 00:00:00");
          $expires = strtotime('+7 days', strtotime($start_date));
          $date_diff=($expires-strtotime($start_date)) / 86400;
          $expiration = date("Y-m-d H:i:s", $expires);
  //      echo "$exp";

684a690

                  ->setValue('expiration', $qb->createNamedParameter($expiration))

Please sign in to comment.