Merge pull request #9207 from owncloud/prevent-default-for-mail-test
Fix test mail behaviour
This commit is contained in:
commit
d94d307f52
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue