Skip to content

Commit

Permalink
Merge branch 'release/2.7.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jan 25, 2019
2 parents aaf97ea + 7284173 commit 6e73483
Show file tree
Hide file tree
Showing 186 changed files with 25,064 additions and 153 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# v2.7.2
## 01/25/2019

1. [](#improved)
* Added default for `to` address
* Updated EN language [#99](https://github.com/getgrav/grav-plugin-email/pull/99)
* Updated UK language [#98](https://github.com/getgrav/grav-plugin-email/pull/98)
* Updated RU language [#100](https://github.com/getgrav/grav-plugin-email/pull/100)
* Updated to SwiftMailer v5.4.12
1. [](#bugfix)
* Fixed `mailtrap` hostname

# v2.7.1
## 12/05/2017

Expand All @@ -7,7 +19,7 @@
* Added examples of setting up Email plugin with various SMTP providers
* Updated RU language [#60](https://github.com/getgrav/grav-plugin-email/pull/60)
* Updated to SwiftMailer v5.4.8

# v2.7.0
## 10/26/2017

Expand Down
66 changes: 33 additions & 33 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Email
version: 2.7.1
version: 2.7.2
description: Enables the emailing system for Grav
icon: envelope
author:
Expand Down Expand Up @@ -30,7 +30,7 @@ form:

mailer.engine:
type: select
label: Mail Engine
label: PLUGIN_EMAIL.MAIL_ENGINE
size: medium
options:
none: Disabled
Expand All @@ -39,7 +39,7 @@ form:

content_type:
type: select
label: Content type
label: PLUGIN_EMAIL.CONTENT_TYPE
size: medium
default: 'text/html'
options:
Expand All @@ -49,29 +49,29 @@ form:
charset:
type: text
size: medium
label: Charset
label: PLUGIN_EMAIL.CHARSET
placeholder: "Defaults to UTF-8"

from:
type: email
size: medium
label: Email from
placeholder: "Default email from address"
label: PLUGIN_EMAIL.EMAIL_FORM
placeholder: PLUGIN_EMAIL.EMAIL_FORM_PLACEHOLDER
validate:
required: true
type: email

from_name:
type: text
size: medium
label: Email from name
placeholder: "Default email from name"
label: PLUGIN_EMAIL.EMAIL_FROM_NAME
placeholder: PLUGIN_EMAIL.EMAIL_FROM_NAME_PLACEHOLDER

to:
type: email
size: medium
label: Email to
placeholder: "Default email to address"
label: PLUGIN_EMAIL.EMAIL_TO
placeholder: PLUGIN_EMAIL.EMAIL_TO_PLACEHOLDER
multiple: true
validate:
required: true
Expand All @@ -80,65 +80,65 @@ form:
to_name:
type: text
size: medium
label: Email to name
placeholder: "Default email to name"
label: PLUGIN_EMAIL.EMAIL_TO_NAME
placeholder: PLUGIN_EMAIL.EMAIL_TO_NAME_PLACEHOLDER

cc:
type: email
size: medium
label: Email CC
placeholder: "Default email CC address"
label: PLUGIN_EMAIL.EMAIL_CC
placeholder: PLUGIN_EMAIL.EMAIL_CC_PLACEHOLDER
multiple: true
validate:
type: email

cc_name:
type: text
size: medium
label: Email CC name
placeholder: "Default email CC name"
label: PLUGIN_EMAIL.EMAIL_CC_NAME
placeholder: PLUGIN_EMAIL.EMAIL_CC_NAME_PLACEHOLDER

bcc:
type: email
size: medium
label: Email BCC
placeholder: "Default email BCC address"
label: PLUGIN_EMAIL.EMAIL_BCC
placeholder: PLUGIN_EMAIL.EMAIL_BCC_PLACEHOLDER
multiple: true
validate:
type: email

reply_to:
type: email
size: medium
label: Email reply-to
placeholder: "Default email reply-to address"
label: PLUGIN_EMAIL.EMAIL_REPLY_TO
placeholder: PLUGIN_EMAIL.EMAIL_REPLY_TO_PLACEHOLDER
multiple: true
validate:
type: email

reply_to_name:
type: text
size: medium
label: Email reply-to name
placeholder: "Default email reply-to name"
label: PLUGIN_EMAIL.EMAIL_REPLY_TO_NAME
placeholder: PLUGIN_EMAIL.EMAIL_REPLY_TO_NAME_PLACEHOLDER

body:
type: textarea
size: medium
label: Email body
placeholder: "Defaults to a table of all form fields"
label: PLUGIN_EMAIL.EMAIL_BODY
placeholder: PLUGIN_EMAIL.EMAIL_BODY_PLACEHOLDER

mailer.smtp.server:
type: text
size: medium
label: SMTP server
placeholder: "e.g. smtp.google.com"
label: PLUGIN_EMAIL.SMTP_SERVER
placeholder: PLUGIN_EMAIL.SMTP_SERVER_PLACEHOLDER

mailer.smtp.port:
type: text
size: small
label: SMTP port
placeholder: "Defaults to 25 (plaintext) / 587 (encrypted)"
label: PLUGIN_EMAIL.SMTP_PORT
placeholder: PLUGIN_EMAIL.SMTP_PORT_PLACEHOLDER
validate:
type: number
min: 1
Expand All @@ -147,7 +147,7 @@ form:
mailer.smtp.encryption:
type: select
size: medium
label: SMTP encryption
label: PLUGIN_EMAIL.SMTP_ENCRYPTION
options:
none: None
ssl: SSL
Expand All @@ -156,22 +156,22 @@ form:
mailer.smtp.user:
type: text
size: medium
label: SMTP login name
label: PLUGIN_EMAIL.SMTP_LOGIN_NAME

mailer.smtp.password:
type: password
size: medium
label: SMTP password
label: PLUGIN_EMAIL.SMTP_PASSWORD

mailer.sendmail.bin:
type: text
size: medium
label: Path to sendmail
label: PLUGIN_EMAIL.PATH_TO_SENDMAIL
placeholder: "/usr/sbin/sendmail"

debug:
type: toggle
label: Debug
label: PLUGIN_EMAIL.DEBUG
highlight: 1
default: 0
options:
Expand Down
6 changes: 5 additions & 1 deletion classes/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ class Utils
*
* @return bool True if the action was performed.
*/
public static function sendEmail($subject, $content, $to, $from = null, $mimetype = 'text/html')
public static function sendEmail($subject, $content, $to = null, $from = null, $mimetype = 'text/html')
{
$grav = Grav::instance();

if (!$to) {
$to = $grav['config']->get('plugins.email.to');
}

if (!$from) {
$from = $grav['config']->get('plugins.email.from');
}
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6e73483

Please sign in to comment.