Skip to content

Commit

Permalink
Merge branch 'release/4.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jul 10, 2023
2 parents f6ed0c3 + 856426d commit c502810
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v4.0.4
## 07/10/2023

1. [](#bugfix)
* Fix for email file attachments using stream

# v4.0.3
## 06/29/2023

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Email
slug: email
type: plugin
version: 4.0.3
version: 4.0.4
testing: false
description: Enables the emailing system for Grav
icon: envelope
Expand Down
5 changes: 4 additions & 1 deletion email.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ protected function sendFormEmail($form, $params, $vars)
{
// Build message
$message = $this->email->buildMessage($params, $vars);
$locator = $this->grav['locator'];

if (isset($params['attachments'])) {
$filesToAttach = (array)$params['attachments'];
Expand All @@ -135,9 +136,11 @@ protected function sendFormEmail($form, $params, $vars)
if (isset($fileValues['file'])) {
$filename = $fileValues['file'];
} else {
$filename = ROOT_DIR . $fileValues['path'];
$filename = $fileValues['path'];
}

$filename = $locator->findResource($filename, true, true);

try {
$message->attachFromPath($filename);
} catch (\Exception $e) {
Expand Down
5 changes: 4 additions & 1 deletion languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ fr:
PLUGIN_EMAIL:
MAIL_ENGINE: "Moteur de messagerie"
MAIL_ENGINE_DISABLED: "Désactivé"
MAIL_ENGINE_DESC: "NOTE : Si vous sélectionnez un moteur fourni par un autre plugin, vous devez configurer les options dans ce même plugin."
CONTENT_TYPE: "Type de contenu"
CONTENT_TYPE_PLAIN_TEXT: "Texte brut"
CHARSET: "Jeu de caractères"
Expand Down Expand Up @@ -130,7 +131,9 @@ fr:
QUEUE_FLUSH_MSG_LIMIT: "Messages par Flush"
QUEUE_FLUSH_MSG_LIMIT_APPEND: "Messages"
QUEUE_FLUSH_TIME_LIMIT: "Délai de Flush"
QUEUE_FLUSH_TIME_LIMIT_APPEND: "Seconds"
QUEUE_FLUSH_TIME_LIMIT_APPEND: "Secondes"
EMAIL_FORMAT: "Utilisez le format `addr` : `[email protected]` ou le format `name-addr` : `Votre nom <[email protected]>`. Séparer par des virgules pour plusieurs adresses."


hr:
PLUGIN_EMAIL:
Expand Down

0 comments on commit c502810

Please sign in to comment.