diff --git a/CHANGELOG.md b/CHANGELOG.md index 724886c..49f69ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# v3.0.2 +## 05/09/2019 + +1. [](#new) + * Requires Form Plugin v3.0.3 + * Added Russian translation [#113](https://github.com/getgrav/grav-plugin-email/pull/113) +1. [](#bugfix) + * Better fix for missing attachments when sending an email using a form [form#333](https://github.com/getgrav/grav-plugin-form/issues/333) + # v3.0.1 ## 04/15/2019 diff --git a/blueprints.yaml b/blueprints.yaml index 50a7a53..dc54865 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: Email -version: 3.0.1 +version: 3.0.2 testing: false description: Enables the emailing system for Grav icon: envelope @@ -14,6 +14,7 @@ license: MIT dependencies: - { name: grav, version: '>=1.6.0' } + - { name: form, version: '>=3.0.3' } form: validation: loose @@ -34,7 +35,7 @@ form: label: PLUGIN_EMAIL.MAIL_ENGINE size: medium options: - none: Disabled + none: PLUGIN_ADMIN.DISABLED smtp: SMTP sendmail: Sendmail @@ -44,14 +45,14 @@ form: size: medium default: 'text/html' options: - 'text/plain': Plain text + 'text/plain': PLUGIN_EMAIL.CONTENT_TYPE_PLAIN_TEXT 'text/html': HTML charset: type: text size: medium label: PLUGIN_EMAIL.CHARSET - placeholder: "Defaults to UTF-8" + placeholder: PLUGIN_EMAIL.CHARSET_PLACEHOLDER email_Defaults: type: section @@ -160,7 +161,7 @@ form: size: medium label: PLUGIN_EMAIL.SMTP_ENCRYPTION options: - none: None + none: PLUGIN_EMAIL.SMTP_ENCRYPTION_NONE ssl: SSL tls: TLS @@ -178,7 +179,7 @@ form: sendmail_config: type: section - title: Sendmail Configuration + title: PLUGIN_EMAIL.SENDMAIL_CONFIGURATION underline: true mailer.sendmail.bin: @@ -217,13 +218,13 @@ form: type: number label: PLUGIN_EMAIL.QUEUE_FLUSH_MSG_LIMIT size: x-small - append: Messages + append: PLUGIN_EMAIL.QUEUE_FLUSH_MSG_LIMIT_APPEND queue.flush_time_limit: type: number label: PLUGIN_EMAIL.QUEUE_FLUSH_TIME_LIMIT size: x-small - append: Seconds + append: PLUGIN_EMAIL.QUEUE_FLUSH_TIME_LIMIT_APPEND advanced_section: type: section diff --git a/email.php b/email.php index 6ac1062..1b7d3e0 100644 --- a/email.php +++ b/email.php @@ -72,7 +72,8 @@ public function onFormProcessed(Event $event) ); // Copy files now, we need those. - // TODO: we need a better solution. Maybe we can use streams for the attachments? + // TODO: needs an update + $form->legacyUploads(); $form->copyFiles(); $grav = Grav::instance(); diff --git a/languages.yaml b/languages.yaml index 74d4d8f..115f1de 100644 --- a/languages.yaml +++ b/languages.yaml @@ -1,8 +1,11 @@ en: PLUGIN_EMAIL: MAIL_ENGINE: "Mail Engine" + MAIL_ENGINE_DISABLED: "Disabled" CONTENT_TYPE: "Content type" + CONTENT_TYPE_PLAIN_TEXT: "Plain text" CHARSET: "Charset" + CHARSET_PLACEHOLDER: "Defaults to UTF-8" EMAIL_FORM: "From address" EMAIL_FORM_PLACEHOLDER: "Default email from address" EMAIL_FROM_NAME: "From name" @@ -28,6 +31,7 @@ en: SMTP_PORT: "SMTP port" SMTP_PORT_PLACEHOLDER: "Defaults to 25 (plaintext) / 587 (encrypted)" SMTP_ENCRYPTION: "SMTP encryption" + SMTP_ENCRYPTION_NONE: "None" SMTP_LOGIN_NAME: "SMTP login name" SMTP_PASSWORD: "SMTP password" PATH_TO_SENDMAIL: "Path to sendmail" @@ -38,6 +42,7 @@ en: TEST_EMAIL_BODY: "
This test email has been sent based on the following configuration:
%1$s" EMAIL_DEFAULTS: "Email Defaults" SMTP_CONFIGURATION: "SMTP Configuration" + SENDMAIL_CONFIGURATION: "Sendmail Configuration" ADVANCED: "Advanced" EMAIL_FOOTER: "GetGrav.org" QUEUE_TITLE: "Email Queue" @@ -46,7 +51,9 @@ en: QUEUE_FLUSH_FREQUENCY: "Flush Frequency" QUEUE_FLUSH_FREQUENCY_HELP: "Use 'cron' format" QUEUE_FLUSH_MSG_LIMIT: "Messages per flush" + QUEUE_FLUSH_MSG_LIMIT_APPEND: "Messages" QUEUE_FLUSH_TIME_LIMIT: "Flush time limit" + QUEUE_FLUSH_TIME_LIMIT_APPEND: "Seconds" @@ -94,8 +101,12 @@ ro: ru: PLUGIN_EMAIL: MAIL_ENGINE: "Почтовая система" + MAIL_ENGINE_DISABLED: "Отключена" CONTENT_TYPE: "Тип контента" + CONTENT_TYPE_PLAIN_TEXT: "Простой текст" CHARSET: "Кодировка" + CHARSET_PLACEHOLDER: "По умолчанию UTF-8" + EMAIL_DEFAULTS: "Email настройки по умолчанию" EMAIL_FORM: "Почта отправителя" EMAIL_FORM_PLACEHOLDER: "Email адрес отправителя по умолчанию" EMAIL_FROM_NAME: "Имя почты отправителя" @@ -116,14 +127,27 @@ ru: EMAIL_REPLY_TO_NAME_PLACEHOLDER: "Email для ответов имя по умолчанию" EMAIL_BODY: "Тело сообщения" EMAIL_BODY_PLACEHOLDER: "По умолчанию используется таблица всех полей формы" + SMTP_CONFIGURATION: "Конфигурация SMTP" SMTP_SERVER: "SMTP сервер" SMTP_SERVER_PLACEHOLDER: "e.g. smtp.google.com" SMTP_PORT: "SMTP порт" SMTP_PORT_PLACEHOLDER: "По умолчанию 25 (plaintext) / 587 (encrypted)" SMTP_ENCRYPTION: "SMTP шифрование" + SMTP_ENCRYPTION_NONE: "Нет" SMTP_LOGIN_NAME: "SMTP логин" SMTP_PASSWORD: "SMTP пароль" + SENDMAIL_CONFIGURATION: "Конфигурация Sendmail" PATH_TO_SENDMAIL: "Путь к sendmail" + QUEUE_TITLE: "Очередь Email" + QUEUE_DESC: "Когда вы включаете очередь email, электронная почта не отправляется немедленно, а отправляется в очередь, затем планировщик Grav обрабатывает очередь и на основе настроенной частоты фактически отправляет электронную почту. Это гарантирует, что Grav не ждет завершения подключения к электронной почте." + QUEUE_ENABLED: "Включено" + QUEUE_FLUSH_FREQUENCY: "Частота обраблтки" + QUEUE_FLUSH_FREQUENCY_HELP: "Использовать формат 'cron'" + QUEUE_FLUSH_MSG_LIMIT: "Количество сообщений на задачу" + QUEUE_FLUSH_MSG_LIMIT_APPEND: "Сообщений" + QUEUE_FLUSH_TIME_LIMIT: "Ограничение времени обработки" + QUEUE_FLUSH_TIME_LIMIT_APPEND: "Секунд" + ADVANCED: "Расширенные" DEBUG: "Отладка" EMAIL_NOT_CONFIGURED: "Электронная почта не настроена" PLEASE_CONFIGURE_A_TO_ADDRESS: "Пожалуйста настройте адрес получателя ('to') в настройках плагина Email Plugin, или на форме"