-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
dev/core#86 Notify admin when testing email if CIVICRM_MAIL_LOG_AND_SEND is set #12037
Conversation
fail is unrelated |
CRM/Admin/Form/Setting/Smtp.php
Outdated
@@ -170,7 +169,10 @@ public function postProcess() { | |||
$errorScope = CRM_Core_TemporaryErrorScope::ignoreException(); | |||
$result = $mailer->send($toEmail, $headers, $message); | |||
unset($errorScope); | |||
if (defined('CIVICRM_MAIL_LOG')) { | |||
if (defined('CIVICRM_MAIL_LOG_AND_SEND')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be defined('CIVICRM_MAIL_LOG_AND_SEND') && defined('CIVICRM_MAIL_LOG') since per below
CIVICRM_MAIL_LOG_AND_SEND doesn't work in isolation - also defined is not enough of a test as they could be defined as 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton Ok, yes. Updated the PR to reflect this. We don't check the value of other defines, only check if they are defined or not - I've changed the "value" to 1 in the settings template for consistency/clarity.
ed77ca6
to
2ddaef9
Compare
OK - I'd prefer we did check the value but given the triviality of this fix I'm prepared to let it go |
Merging as per tag |
@mattwire @eileenmcnaughton I think that the actual constant name is |
@davialexandre see https://lab.civicrm.org/dev/core/issues/86 there are actually 3 PRs for this |
@mattwire since there’s no link anywhere to this third PR, it’s a bit hard to find it. |
@davialexandre Sorry, the gitlab issue was meant to reference it but I put the wrong link in for the civicrm-packages PR - now fixed. Do constants with spaces actually work? It wasn't documented nor in the default settings file and it's generally meant for debug/development so I would think it's ok to just mention it in the release notes rather than have an overlap. If it's a problem, you can always define both in your config files. |
@davialexandre @mattwire I think we should document CIVICRM_MAIL_LOG_AND_SEND but we should make both work |
@mattwire it works partially (even though the documentation here indicates it should not work at all). Check this example: https://3v4l.org/BvFLb |
@davialexandre - did you see I merged the packages PR so we can start to kiss it goodbye |
Overview
When CIVICRM_MAIL_LOG_AND_SEND is set the admin is not notified if it is set, but they are if CIVICRM_MAIL_LOG is set. With this PR they are notified if either is set.
https://lab.civicrm.org/dev/core/issues/86
Before
No notification if CIVICRM_MAIL_LOG_AND_SEND is set.
After