/**
 * @package         Joomla.JavaScript
 * @copyright       Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license         GNU General Public License version 2 or later; see LICENSE.txt
 */
jQuery(document).ready(function(e){e("#sendtestmail").click(function(){var s={smtpauth:e('input[name="jform[smtpauth]"]').val(),smtpuser:e('input[name="jform[smtpuser]"]').val(),smtppass:e('input[name="jform[smtppass]"]').val(),smtphost:e('input[name="jform[smtphost]"]').val(),smtpsecure:e('select[name="jform[smtpsecure]"]').val(),smtpport:e('input[name="jform[smtpport]"]').val(),mailfrom:e('input[name="jform[mailfrom]"]').val(),fromname:e('input[name="jform[fromname]"]').val(),mailer:e('select[name="jform[mailer]"]').val(),mailonline:e('input[name="jform[mailonline]"]:checked').val()};e.ajax({url:sendtestmail_url,data:s}).done(function(s){var m=e.parseJSON(s),a={};m.data?"object"==typeof m.messages&&"undefined"!=typeof m.messages.success&&m.messages.success.length>0&&(a.success=[m.messages.success]):"object"==typeof m.messages&&("undefined"!=typeof m.messages.error&&m.messages.error.length>0&&(a.error=[m.messages.error]),"undefined"!=typeof m.messages.notice&&m.messages.notice.length>0&&(a.notice=[m.messages.notice]),"undefined"!=typeof m.messages.message&&m.messages.message.length>0&&(a.message=[m.messages.message])),Joomla.renderMessages(a)}),window.scrollTo(0,0)})});
