<commit_before>
angular.module('codingBarrierApp').controller('contactController', function ($rootScope, $scope, $http) {
    $rootScope.header = 'Contact';
    $rootScope.message = 'This will be my contact page!';

    $scope.clear = function () {
        $scope.form.name = '';
        $scope.form.email = '';
        $scope.form.subject = '';
        $scope.form.message = '';
    };

    $scope.sendEmail = function () {
        $http({
            method: 'POST',
            url: '/mail/',
            data: $.param($scope.form), // pass in data as strings
            headers: {'Content-Type': 'application/x-www-form-urlencoded'}  
        })
                .success(function () {
                    
                });
    };
});<commit_msg>Server sends depending on website domain.<commit_after>
angular.module('codingBarrierApp').controller('contactController', function ($rootScope, $scope, $http) {
    $rootScope.header = 'Contact';
    $rootScope.message = 'This will be my contact page!';

    $scope.clear = function (form) {
        if (form) {
            form.$setPristine();
            form.$setUntouched();
        }
        $scope.user = {};
    };

    $scope.sendEmail = function () {
        if ($rootScope.siteName.indexOf("Coding") > 0) {
            $scope.user.to="<NAME> <<EMAIL>>";
        } else {
            $scope.user.to="<NAME> <<EMAIL>>";
        }
        console.log($.param($scope.user));
        $http({
            method: 'POST',
            url: '/mail/',
            data: $.param($scope.user), // pass in data as strings
            headers: {'Content-Type': 'application/x-www-form-urlencoded'}
        })
                .success(function () {

                });
    };

    $scope.clear();
});
{'fraction_non_alphanumeric': 0.17257142857142857, 'fraction_numerical': 0.0005714285714285715, 'mean_word_length': 1.8657937806873977, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2826379', 'n_tokens_mistral': 511, 'n_tokens_neox': 495, 'n_words': 95}