Changeset - 333b3e7c991f
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 14 years ago 2011-11-12 11:20:50
marcin@python-works.com
Added email sending test site
2 files changed with 33 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/admin/settings.py
Show inline comments
 
@@ -254,6 +254,16 @@ class SettingsController(BaseController)
 

	
 
            return redirect(url('admin_edit_setting', setting_id='hooks'))
 

	
 

	
 

	
 
        if setting_id == 'email':
 
            test_email = request.POST.get('test_email')
 
            test_email_subj = 'RhodeCode TestEmail'
 
            test_email_body = 'RhodeCode Email test'
 

	
 
            run_task(tasks.send_email, [test_email], test_email_subj,
 
                     test_email_body)
 
            h.flash(_('Email task created'), category='success')
 
        return redirect(url('admin_settings'))
 

	
 
    @HasPermissionAllDecorator('hg.admin')
rhodecode/templates/admin/settings/settings.html
Show inline comments
 
@@ -188,5 +188,28 @@
 
            });
 
        });
 
    </script>
 
    
 
    <h3>${_('Test Email')}</h3>
 
    ${h.form(url('admin_setting', setting_id='email'),method='put')}
 
    <div class="form">
 
        <!-- fields -->
 
        
 
        <div class="fields">
 
            <div class="field">
 
                <div class="label">
 
                    <label for="test_email">${_('Email to')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('test_email',size=30)}
 
                </div>
 
            </div>
 
                            
 
            <div class="buttons">
 
            ${h.submit('send',_('Send'),class_="ui-button")}
 
            </div>                                                          
 
        </div>
 
    </div>  
 
    ${h.end_form()}    
 
    
 
</div>
 
</%def>    
0 comments (0 inline, 0 general)