Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for other config['mailer'] options. #872

Merged
merged 2 commits into from
Nov 20, 2018
Merged

Add support for other config['mailer'] options. #872

merged 2 commits into from
Nov 20, 2018

Conversation

apple314159
Copy link
Contributor

PHPMailer supports other mailer options such as Mail, Qmail, and sendmail.
Tested with sendmail.

@lcharette
Copy link
Member

Related #776 ? Setting up sendmail as default, at least for Vagrant install, could be helpful. I'll have to check what email support Homestead as installed by default.

Either way, adding an env config for this would be nice too.

@lcharette lcharette added this to the 4.2.0 milestone Apr 2, 2018
@lcharette lcharette added the mail Email related label Apr 2, 2018
@apple314159
Copy link
Contributor Author

I don't use Vagrant or Homestead.

In our setup, our email server is on another machine. I wanted to queue email locally using sendmail to not block PHP.

app/sprinkles/core/src/Mail/Mailer.php Outdated Show resolved Hide resolved
app/sprinkles/core/src/Mail/Mailer.php Outdated Show resolved Hide resolved
app/sprinkles/core/src/Mail/Mailer.php Outdated Show resolved Hide resolved
Copy link
Member

@lcharette lcharette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just make sure everything is aligned correctly according to PSR rules. not sure about that case place... Might be wrong too.

@lcharette
Copy link
Member

@alexweissman That if (isset($config['mailer'])) {... In the original code, if no  mailer was defined, the exception wasn't thrown. Was that intended? Otherwise, the switch will work fine if that ìfis not there, but the hpmailerException` will always be thrown if there's no config thrown.

Original : https://github.com/apple314159/UserFrosting/blob/master/app/sprinkles/core/src/Mail/Mailer.php#L46
Modified: https://github.com/apple314159/UserFrosting/blob/ccda4012456f0ea7aec6f6b110805c5736d0f622/app/sprinkles/core/src/Mail/Mailer.php#L46

@lcharette lcharette self-assigned this Oct 13, 2018
@lcharette lcharette changed the base branch from master to develop November 20, 2018 01:26
@lcharette lcharette merged commit ccda401 into userfrosting:develop Nov 20, 2018
@lcharette
Copy link
Member

Merged manually in f67e358 for the develop branch. Will be released in 4.2; Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mail Email related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants