Merge pull request #9207 from owncloud/prevent-default-for-mail-test

Fix test mail behaviour
This commit is contained in:
Joas Schilling 2014-06-30 11:22:20 +02:00
commit d94d307f52
2 changed files with 4 additions and 4 deletions

View File

@ -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());

View File

@ -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);
});
});