summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-06-25 15:32:40 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-06-25 15:32:40 +0200
commit6e2aaaaa31afc31b0ed216ded52b3b0ab9eb61ad (patch)
treea769b415d0a2b350ffd1058d805a0e3742f14955 /settings
parentb1116880f861cf5b72d45a9edfabfdd7d48a9887 (diff)
downloadnextcloud-server-6e2aaaaa31afc31b0ed216ded52b3b0ab9eb61ad.tar.gz
nextcloud-server-6e2aaaaa31afc31b0ed216ded52b3b0ab9eb61ad.zip
Fix test mail behaviour
* ref #8854 * prevent default of "send test mail" button * drop unused form serialization * use display name of user for test mail
Diffstat (limited to 'settings')
-rw-r--r--settings/admin/controller.php2
-rw-r--r--settings/js/admin.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/settings/admin/controller.php b/settings/admin/controller.php
index d0dcc49f297..7ced57791e9 100644
--- a/settings/admin/controller.php
+++ b/settings/admin/controller.php
@@ -86,7 +86,7 @@ class Controller {
$defaults = new \OC_Defaults();
try {
- \OC_Mail::send($email, $_POST['user'],
+ \OC_Mail::send($email, \OC_User::getDisplayName(),
$l->t('test email settings'),
$l->t('If you received this email, the settings seem to be correct.'),
\OCP\Util::getDefaultEmailAddress('no-reply'), $defaults->getName());
diff --git a/settings/js/admin.js b/settings/js/admin.js
index 7036f6dbf2a..a202feb4f65 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -123,10 +123,10 @@ $(document).ready(function(){
});
});
- $('#sendtestemail').click(function(){
+ $('#sendtestemail').click(function(event){
+ event.preventDefault();
OC.msg.startAction('#sendtestmail_msg', t('settings', 'Sending...'));
- var post = $( "#sendtestemail" ).serialize();
- $.post(OC.generateUrl('/settings/admin/mailtest'), post, function(data){
+ $.post(OC.generateUrl('/settings/admin/mailtest'), '', function(data){
OC.msg.finishedAction('#sendtestmail_msg', data);
});
});