summaryrefslogtreecommitdiffstats
path: root/apps/sharebymail
diff options
context:
space:
mode:
Diffstat (limited to 'apps/sharebymail')
-rw-r--r--apps/sharebymail/l10n/pt_BR.js2
-rw-r--r--apps/sharebymail/l10n/pt_BR.json2
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php17
3 files changed, 17 insertions, 4 deletions
diff --git a/apps/sharebymail/l10n/pt_BR.js b/apps/sharebymail/l10n/pt_BR.js
index 558107b0afa..173abe70dc4 100644
--- a/apps/sharebymail/l10n/pt_BR.js
+++ b/apps/sharebymail/l10n/pt_BR.js
@@ -18,7 +18,7 @@ OC.L10N.register(
"Password to access {file} was sent to you" : "A senha para acesso {file} foi enviada para você",
"Sharing %s failed, this item is already shared with %s" : "O compartilhamento %s falhou, pois este item já está compartilhado com %s",
"We can't send you the auto-generated password. Please set a valid email address in your personal settings and try again." : "Não pudemos enviar a você a senha auto-gerada. por favor defina um e-mail válido em sua configuração e tente novamente.",
- "Failed to send share by email" : "Falha ao enviar compartilhamento por e-mail",
+ "Failed to send share by email" : "Falha ao enviar compartilhamento via e-mail",
"%s shared »%s« with you" : "%s compartilhou »%s« com você",
"%s shared »%s« with you." : "%s compartilhou »%s« com você.",
"Click the button below to open it." : "Clique no botão abaixo para abrí-lo.",
diff --git a/apps/sharebymail/l10n/pt_BR.json b/apps/sharebymail/l10n/pt_BR.json
index f8a4bdd9328..8c2964ef257 100644
--- a/apps/sharebymail/l10n/pt_BR.json
+++ b/apps/sharebymail/l10n/pt_BR.json
@@ -16,7 +16,7 @@
"Password to access {file} was sent to you" : "A senha para acesso {file} foi enviada para você",
"Sharing %s failed, this item is already shared with %s" : "O compartilhamento %s falhou, pois este item já está compartilhado com %s",
"We can't send you the auto-generated password. Please set a valid email address in your personal settings and try again." : "Não pudemos enviar a você a senha auto-gerada. por favor defina um e-mail válido em sua configuração e tente novamente.",
- "Failed to send share by email" : "Falha ao enviar compartilhamento por e-mail",
+ "Failed to send share by email" : "Falha ao enviar compartilhamento via e-mail",
"%s shared »%s« with you" : "%s compartilhou »%s« com você",
"%s shared »%s« with you." : "%s compartilhou »%s« com você.",
"Click the button below to open it." : "Clique no botão abaixo para abrí-lo.",
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 3bcd1512c41..f4db83ea3cf 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -456,11 +456,24 @@ class ShareByMailProvider implements IShareProvider {
$emailTemplate->addHeading($this->l->t('Password to access »%s«', [$filename]), false);
$emailTemplate->addBodyText($htmlBodyPart, $plainBodyPart);
$emailTemplate->addBodyText($this->l->t('It is protected with the following password: %s', [$password]));
- $emailTemplate->addFooter();
+ // The "From" contains the sharers name
+ $instanceName = $this->defaults->getName();
+ $senderName = $this->l->t(
+ '%s via %s',
+ [
+ $initiatorDisplayName,
+ $instanceName
+ ]
+ );
+ $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
if ($initiatorEmailAddress !== null) {
- $message->setFrom([$initiatorEmailAddress => $initiatorDisplayName]);
+ $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]);
+ $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
+ } else {
+ $emailTemplate->addFooter();
}
+
$message->setTo([$shareWith]);
$message->setSubject($subject);
$message->setBody($emailTemplate->renderText(), 'text/plain');