<commit_before>Meteor.methods({
  addContactUsMessage: function(message) {

    try {
      // synchronous (to the server) insert
      ContactUsMessages.insert({
        name: message.name,
        email: message.email,
        zipcode: message.zipcode,
        text: message.text,
        createdAt: new Date(),
        authorId: Meteor.userId(), // can be null, meaning a message from someone not logged in
      });
      
      // send an email to ourselves containing the message
      var text = 'name: ' + message.name + 
        '\nemail: ' + message.email +
        '\nzipcode: ' + message.zipcode +
        '\ntext: ' + message.text;
      var email = {
        to: "GrowSocial Pilot Coordinator <<EMAIL>>",
        from: "GrowSocial Pilot Website <<EMAIL>>",
        subject: "GrowSocial pilot message - Contact Us",
        text: text,
      };
      // no need to do anything with email errors here, so pass empty callback
      Meteor.call('sendEmail', email, function() {});
      return; // undefined, i.e. a positive response to client/caller
      
    } catch (err) {
      console.log('caught err from insert, will add to error log, then rethrow to server & client');
      Meteor.call('addErrorLog', {
        tag: 'ContactUsMessages.insert',<commit_msg>Use a real email in contactUs email from-field<commit_after>Meteor.methods({
  addContactUsMessage: function(message) {

    try {
      // synchronous (to the server) insert
      ContactUsMessages.insert({
        name: message.name,
        email: message.email,
        zipcode: message.zipcode,
        text: message.text,
        createdAt: new Date(),
        authorId: Meteor.userId(), // can be null, meaning a message from someone not logged in
      });
      
      // send an email to ourselves containing the message
      var text = 'name: ' + message.name + 
        '\nemail: ' + message.email +
        '\nzipcode: ' + message.zipcode +
        '\ntext: ' + message.text;
      var email = {
        to: "GrowSocial Pilot Coordinator <<EMAIL>>",
        from: "GrowSocial Pilot Website <<EMAIL>>",
        subject: "GrowSocial pilot message - Contact Us",
        text: text,
      };
      // no need to do anything with email errors here, so pass empty callback
      Meteor.call('sendEmail', email, function() {});
      return; // undefined, i.e. a positive response to client/caller
      
    } catch (err) {
      console.log('caught err from insert, will add to error log, then rethrow to server & client');
      Meteor.call('addErrorLog', {
        tag: 'ContactUsMessages.insert',
{'fraction_non_alphanumeric': 0.1148936170212766, 'fraction_numerical': 0.0, 'mean_word_length': 2.319640564826701, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '4653247', 'n_tokens_mistral': 737, 'n_tokens_neox': 714, 'n_words': 236}