<commit_before>var nodemailer = require('nodemailer'),
    smtpTransport = require('nodemailer-smtp-transport'),
    secrets       = require('../../config/secrets');

module.exports = {
  sendMessage: function(req, res, next){
    var transporter = nodemailer.createTransport(secrets.mailOptions);
    var fullname    = req.body.name.toLowerCase();
    var senderEmail = req.body.email.toLowerCase();
    var emailTo     = '<EMAIL>';
    var subject     = 'Enquiry From meanmap.com by ' + senderEmail;
    var text        = req.body.message;

    var mailOptions = {
      from:    senderEmail,
      to:      emailTo,
      subject: subject,
      text:    text
    };

    // Send the email
    transporter.sendMail(mailOptions, function(err, info){
      if(err){
        res.status(500).send({
          "message": "Message sending failed",
          "error": err
        });
      }
      else{
        res.json({ success: true, message: "Message sent successfully", response: info });
      }
    });<commit_msg>Add Self-Explanatory Comments<commit_after>var nodemailer = require('nodemailer'),
    smtpTransport = require('nodemailer-smtp-transport'),
    secrets       = require('../../config/secrets');

module.exports = {
  /**
   * Send An Email To The Admin About Enquiries Made By Users
   * @param  {void}   req
   * @param  {void}   res
   * @param  {Function} next
   * @return {object}
   */
  sendMessage: function(req, res, next){
    var transporter = nodemailer.createTransport(secrets.mailOptions);
    var fullname    = req.body.name.toLowerCase();
    var senderEmail = req.body.email.toLowerCase();
    var emailTo     = '<EMAIL>';
    var subject     = 'Enquiry From meanmap.com by ' + senderEmail;
    var text        = req.body.message;

    var mailOptions = {
      from:    senderEmail,
      to:      emailTo,
      subject: subject,
      text:    text
    };

    // Send the email
    transporter.sendMail(mailOptions, function(err, info){
      if(err){
        res.status(500).send({
          "message": "Message sending failed",
          "error": err
        });
      }
      else{
        res.json({ success: true, message: "Message sent successfully", response: info });
      }
    });
{'fraction_non_alphanumeric': 0.13144908030506955, 'fraction_numerical': 0.0026917900403768506, 'mean_word_length': 2.3685800604229605, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, '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': '4419', 'n_tokens_mistral': 663, 'n_tokens_neox': 656, 'n_words': 160}