' . $hesklang['mysql_said'] . ': ' . $mysql_log);
}
else
{
hesk_show_error($mysql_error);
}
}
// Test POP3 connection
elseif ($test_type == 'pop3')
{
if ( hesk_testPOP3() )
{
hesk_show_success($hesklang['conok'] . '
' . sprintf($hesklang['tst_cnt'], $emails_found) );
if ($emails_found > 10) {
hesk_show_notice( sprintf($hesklang['wrn_pop3'], $emails_found, $hesklang['pop3']), ' ', false);
}
}
else
{
hesk_show_error( $pop3_error . '
' );
}
}
// Test SMTP connection
elseif ($test_type == 'smtp')
{
if ( hesk_testSMTP() )
{
// If no username/password add a notice
if ($set['smtp_user'] == '' && $set['smtp_user'] == '' && $set['smtp_conn_type'] != 'oauth')
{
$hesklang['conok'] .= '
' . $hesklang['conokn'];
}
hesk_show_success($hesklang['conok']);
}
else
{
hesk_show_error( $smtp_error . '
' );
}
}
// Test IMAP connection
elseif ($test_type == 'imap')
{
if ( hesk_testIMAP() )
{
hesk_show_success($hesklang['conok'] . '
' . sprintf($hesklang['tst_cnt'], $emails_found) );
if ($emails_found > 10) {
hesk_show_notice( sprintf($hesklang['wrn_imap'], $emails_found, $hesklang['imap']), ' ', false);
}
}
else
{
hesk_show_error( $imap_error . '
' );
}
}
// Not a valid test...
else
{
die($hesklang['attempt']);
}
exit();
?>