Skip to content

Commit

Permalink
Remove deprecated PHP mail engine
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 27, 2017
1 parent 6e24a68 commit 47ba435
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -23,6 +23,7 @@ The first setting you'd likely change is your `Email from` / `Email to` names an
Also, you'd likely want to setup a SMTP server instead of using PHP Mail, as the latter is not 100% reliable and you might experience problems with emails.

# Testing emails
> NOTE: `engine: mail` has been deprecated from the SwiftMail library that this plugin uses as it does not funtion at all. Please use `smtp` if at all possibe, and `sendmail` if SMTP is not an option.
A good way to test emails is to use a SMTP server service that's built for testing emails, for example [https://mailtrap.io](https://mailtrap.io)

Expand Down
1 change: 0 additions & 1 deletion blueprints.yaml
Expand Up @@ -36,7 +36,6 @@ form:
none: Disabled
smtp: SMTP
sendmail: Sendmail
mail: PHP Mail

content_type:
type: select
Expand Down
4 changes: 1 addition & 3 deletions classes/Email.php
Expand Up @@ -165,13 +165,11 @@ protected function getMailer()
}
break;
case 'sendmail':
default:
$options = $config->get('plugins.email.mailer.sendmail');
$bin = !empty($options['bin']) ? $options['bin'] : '/usr/sbin/sendmail';
$transport = \Swift_SendmailTransport::newInstance($bin);
break;
case 'mail':
default:
$transport = \Swift_MailTransport::newInstance();
}

// Create the Mailer using your created Transport
Expand Down
4 changes: 2 additions & 2 deletions email.yaml
Expand Up @@ -4,14 +4,14 @@ from_name:
to:
to_name:
mailer:
engine: mail
engine: sendmail
smtp:
server: localhost
port: 25
encryption: none
user: ''
password: ''
sendmail:
bin: '/usr/sbin/sendmail'
bin: '/usr/sbin/sendmail -bs'
content_type: text/html
debug: false

0 comments on commit 47ba435

Please sign in to comment.