<commit_before><?php

function sendEmail($msg, $sub, $to) 
{
    $timestamp = date( 'r', strtotime( 'now' ) );

    $msg .= "
        <p>==========================================================</p>
        <p>
        This email is a computer generated email, you need not reply. In case of 
        any query or issue, please write to <EMAIL>. 
        </p>
        <p>Email generated on : $timestamp </p>
        <p>==========================================================</p>
        ";

    $msgfile = "/tmp/__msg__.html";

    file_put_contents( $msgfile, $msg );
    $to = trim( $to );

    $cmd= __DIR__ . "/sendmail.py '$to' '$sub' '$msgfile' 2>&1 | tee /tmp/_sendmail.log_";
    $out = shell_exec( $cmd );

    unlink( $msgfile );

    return $out;
}

// $res = sendEmail( "testing"
//     , "Your request has been created"
//     , "<EMAIL>" 
//     );<commit_msg>Dont delete the mail file. Till testing is over.<commit_after><?php

function sendEmail($msg, $sub, $to) 
{
    $timestamp = date( 'r', strtotime( 'now' ) );

    $msg .= "
        <p>==========================================================</p>
        <p>
        This email is a computer generated email, you need not reply. In case of 
        any query or issue, please write to <EMAIL>. 
        </p>
        <p>Email generated on : $timestamp </p>
        <p>==========================================================</p>
        ";

    $msgfile = "/tmp/__msg__.html";

    file_put_contents( $msgfile, $msg );
    $to = trim( $to );

    $cmd= __DIR__ . "/sendmail.py '$to' '$sub' '$msgfile' ";
    $out = shell_exec( $cmd );

    //unlink( $msgfile );

    return $out;
}

// $res = sendEmail( "testing"
//     , "Your request has been created"
//     , "<EMAIL>" 
//     );
{'fraction_non_alphanumeric': 0.28701077708451506, 'fraction_numerical': 0.0011344299489506524, 'mean_word_length': 2.506958250497018, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3118818', 'n_tokens_mistral': 574, 'n_tokens_neox': 544, 'n_words': 155}