sendTestMail() public static method

public static sendTestMail ( $userData )
コード例 #1
0
ファイル: smtp.php プロジェクト: sudogitguy/livehelperchat
        $data['port'] = '';
    }
    if ($form->hasValidData('use_smtp') && $form->use_smtp == true) {
        $data['use_smtp'] = 1;
    } else {
        $data['use_smtp'] = 0;
    }
    if ($form->hasValidData('username')) {
        $data['username'] = $form->username;
    } else {
        $data['username'] = '';
    }
    if ($form->hasValidData('password')) {
        $data['password'] = $form->password;
    } else {
        $data['password'] = '';
    }
    $smtpData->value = serialize($data);
    $smtpData->saveThis();
    if (isset($_POST['StoreSMTPSettingsTest'])) {
        try {
            erLhcoreClassChatMail::sendTestMail($currentUser->getUserData());
        } catch (Exception $e) {
            $tpl->set('errors', array($e->getMessage()));
        }
    }
    $tpl->set('updated', 'done');
}
$tpl->set('smtp_data', $data);
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('url' => erLhcoreClassDesign::baseurl('system/configuration'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('system/htmlcode', 'System configuration')), array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('system/smtp', 'SMTP settings')));