? ? ? Success

User tests: Successful: Unsuccessful:

avatar Kubik-Rubik
Kubik-Rubik
10 Dec 2015

This PR adds a new button ("Send Test Mail") in the Global Configuration with which the email settings can be tested with one click!

After the click on the button, the email data is transferred via an Ajax request to the server and a test mail is created and sent to the specified email address. If the sending process fails, a message with the error is displayed (see screenshots).

You don't have to save the configuration first, because the sending process will always be executed with the current entered values. Once the email settings are right, you should save them with a click on the "Save" button.

How to test

Install patch, go to the Global Configuration and click on the button! :-)
Change some settings (e.g. enter wrong values) and try it again.

Important: You should also test on an online server from which you really can send emails to receive the test mail. For instance, on local environments the "PHP Mail" option does not throw an error even though the email was not sent (if not configured properly)!

bildschirmfoto 2015-12-10 um 10 16 56

bildschirmfoto 2015-12-10 um 14 56 33

bildschirmfoto 2015-12-10 um 14 57 10

avatar Kubik-Rubik Kubik-Rubik - open - 10 Dec 2015
avatar Kubik-Rubik Kubik-Rubik - change - 10 Dec 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Dec 2015
Labels Added: ? ?
avatar Kubik-Rubik Kubik-Rubik - change - 10 Dec 2015
Milestone Added:
avatar Kubik-Rubik Kubik-Rubik - change - 10 Dec 2015
Labels Added: ?
avatar brianteeman brianteeman - test_item - 10 Dec 2015 - Tested successfully
avatar brianteeman
brianteeman - comment - 10 Dec 2015

I have tested this item :white_check_mark: successfully on bf8e351

Tested in localhost with phpmail, sendmail and smtp mail - all worked

I think its a little confusing (or not documented) that the test email is sent to the email address defined in the From email field


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Dec 2015

This PR has received new commits.

CC: @brianteeman


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar Kubik-Rubik
Kubik-Rubik - comment - 10 Dec 2015

@brianteeman Thank you for testing it. Yes, this should be documented. Maybe directly in the success message? If yes, could you please send me the correct wording?

avatar brianteeman
brianteeman - comment - 10 Dec 2015

how about
+COM_CONFIG_SENDMAIL_SUCCESS="The email was sent successfully to %email. You should check that you've received the test email."

avatar brianteeman
brianteeman - comment - 10 Dec 2015

Or even better
+COM_CONFIG_SENDMAIL_SUCCESS="The email was sent successfully to %email using %method. You should check that you've received the test email."

avatar Kubik-Rubik
Kubik-Rubik - comment - 10 Dec 2015

@brianteeman Good idea!

avatar brianteeman
brianteeman - comment - 10 Dec 2015

Might be worth changing the email body message as well to show the settings
that were used to send the email

Perhaps
+COM_CONFIG_SENDMAIL_BODY="This is a test mail sent using %method. If you
receive it, then your email settings are correct!"

And even better if it could include all the options for that method

Otherwise when testing and receiving multiple emails you dont know which
method was successfully receieved

On 10 December 2015 at 14:37, Viktor Vogel notifications@github.com wrote:

@brianteeman https://github.com/brianteeman Good idea!


Reply to this email directly or view it on GitHub
#8643 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Dec 2015

This PR has received new commits.

CC: @brianteeman


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar Kubik-Rubik
Kubik-Rubik - comment - 10 Dec 2015

@brianteeman PR updated with your suggestions. Could you please re-test? Thank you!

avatar brianteeman
brianteeman - comment - 10 Dec 2015

Completely stopped working now
I have a button but thats all - pressing it doesnt give a success OR a fail
message

On 10 December 2015 at 16:15, Viktor Vogel notifications@github.com wrote:

@brianteeman https://github.com/brianteeman PR updated with your
suggestions. Could you please re-test? Thank you!


Reply to this email directly or view it on GitHub
#8643 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 10 Dec 2015

Correction - I received the emails with the updated message so it was just in the Joomla admin that I was not getting any messages


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar brianteeman brianteeman - test_item - 10 Dec 2015 - Tested successfully
avatar Kubik-Rubik
Kubik-Rubik - comment - 10 Dec 2015

@brianteeman I've changed the JavaScript file, so you have first to clear your browser cache.

avatar brianteeman
brianteeman - comment - 10 Dec 2015

I have tested this item :white_check_mark: successfully on 43ba153

I just looked at the code and saw it was using some js - so my last problem was just a JS cache issue
All working well now.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Dec 2015

This PR has received new commits.

CC: @brianteeman


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar Kubik-Rubik
Kubik-Rubik - comment - 10 Dec 2015

Updated screenshot:

bildschirmfoto 2015-12-10 um 17 29 23

avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Dec 2015

This PR has received new commits.

CC: @brianteeman


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar pe7er pe7er - test_item - 10 Dec 2015 - Tested successfully
avatar pe7er
pe7er - comment - 10 Dec 2015

I have tested this item :white_check_mark: successfully on a4000f2

Works good!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar alikon
alikon - comment - 10 Dec 2015

tested successfully

avatar RickR2H
RickR2H - comment - 10 Dec 2015

Switching only to SMTP and not filling any SMTP settings activates the phpmail fallback on clicking the button. The message states "The email was sent successfully to rick@r2h.nl using SMTP. You should check that you've received the test email." But it should give a message that not all SMTP settings are filled ans mail cannot be sent. Also filling all the fields with false date ativates the fallback to phpmail and ther is also no error message.

avatar brianteeman
brianteeman - comment - 10 Dec 2015

But it should give a message that not all SMTP settings are filled ans mail cannot be sent. Also filling all the fields with false date ativates the fallback to phpmail and ther is also no error message.

When I put in invalid data I got a failed message

rnhf

avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Dec 2015

This PR has received new commits.

CC: @brianteeman, @pe7er


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar Gerlof Gerlof - test_item - 11 Dec 2015 - Tested successfully
avatar Gerlof
Gerlof - comment - 11 Dec 2015

I have tested this item :white_check_mark: successfully on bf5ba5e


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar dwarkeshsoni dwarkeshsoni - test_item - 12 Dec 2015 - Tested successfully
avatar dwarkeshsoni
dwarkeshsoni - comment - 12 Dec 2015

I have tested this item :white_check_mark: successfully on bf5ba5e


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar Fedik
Fedik - comment - 12 Dec 2015

Beside that the thing is working, I have the note to :smile:

In suggested implementation sendTestMail() totally ignore the form application.xml, this could leed to "false" result (after changes in the form in the future), example sendTestMail say OK but after saving the form validation say FAIL

So my suggestion is to use "common routine" (form filtering and validation) instead of fancy stuff with $app->input in sendTestMail()

Take save.php as example, in Sendtestmail controller, do something like:

$form = $model->getForm();
$validatedData = $model->validate($form, $data);
$result = $model->sendTestMail($validatedData);

To make the form validate only Email params, in the model loadForm need to use $xpath for fieldset[@name="mail"]. So maybe can be need one more method for getEmailForm here or something.

Just suggestion :smile:

avatar brianteeman brianteeman - change - 20 Jan 2016
Status Pending Ready to Commit
Labels
avatar brianteeman
brianteeman - comment - 20 Jan 2016

Setting RTC- would be good to get this in 3.5 and not have to wait a year for 3.6 - there are no b/c issues


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8643.

avatar joomla-cms-bot joomla-cms-bot - change - 20 Jan 2016
Labels Added: ?
avatar wilsonge wilsonge - change - 20 Jan 2016
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2016-01-20 00:57:34
Closed_By wilsonge
Labels Added: ?
avatar brianteeman brianteeman - change - 11 May 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment