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

send test mail button ajax call has always smtpauth = 1 #9803

Closed
wants to merge 4 commits into from
Closed

send test mail button ajax call has always smtpauth = 1 #9803

wants to merge 4 commits into from

Conversation

anibalsanchez
Copy link
Contributor

Pull Request for Issue #9768.

Summary of Changes

Send Test Mail button does not correctly evaluate "SMTP Authentication" radio. Then, mails are sent via SMTP even when "SMTP Authentication" is disabled.

Fix: smtpauth : $('input[name="jform[smtpauth]"]:checked').val(),

Testing Instructions

  1. Fill all SMTP fields in Mail Settings for a server that requires authentication
  2. Test it, click on 'Send Test Mail' button to receive an email
  3. Disable "SMTP Authentication" radio
  4. Test it, click on 'Send Test Mail' button ... email must not be received

Updated from #9685. Simply re-applied :checked
Updated from #9685. Simply re-applied :checked.
@brianteeman brianteeman changed the title #9768 send test mail button ajax call has always smtpauth = 1 send test mail button ajax call has always smtpauth = 1 Apr 8, 2016
@brianteeman
Copy link
Contributor

Not sure its quite correct
If I set smtp and authentication yes and invalid username and password then i correctly get SMTP Error: Could not authenticate.
BUT

  1. If i leave username and password empty i get the success message
  2. If i enter a fake username and leave password empty I get the success message

@anibalsanchez
Copy link
Contributor Author

@brianteeman The problem is found when your fill all SMTP credentials and keep "SMTP Authentication"=No... it applies the credentials even when it is disabled.

In this PR, I have modified the code to really check for the "SMTP Authentication" radio value.

An alternative solution could be to just remove the useless "SMTP Authentication" radio. If there are SMTP credentials, they are applied without checking for a radio.

@smz
Copy link
Contributor

smz commented Apr 8, 2016

An alternative solution could be to just remove the useless "SMTP Authentication" radio. If there are SMTP credentials, they are applied without checking for a radio.

This! (and, if you wish, password displayed on showon of the username...)

@smz
Copy link
Contributor

smz commented Apr 8, 2016

... but probably "showon not empty text field" is not possible, or is it?

@anibalsanchez
Copy link
Contributor Author

The aim of this issue is to fix the user interface bug.

@andrepereiradasilva
Copy link
Contributor

could you solve the conflicts now the other one as been merged?

@anibalsanchez
Copy link
Contributor Author

Please, close this one as I have submitted an updated PR for testing - #9904

@andrepereiradasilva @smz

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

Successfully merging this pull request may close these issues.

None yet

5 participants