<commit_before>'use strict';
const nodemailer = require('nodemailer');

/* 
*  Get the app info here because I don't want this to be on GitHub
*  Ask Dave for this information and don't upload the file to GitHub...
*  I will deny your pull request if you have this info in your directory.
*/
var fs = require('fs');
var gmailAppInfo = fs.readFileSync('GmailAppInfo.txt', 'utf8');
gmailAppInfo = gmailAppInfo.split('\n');

// create reusable transporter object using the default SMTP transport
let transporter = nodemailer.createTransport({
	service: 'gmail',
	auth: {
		user: gmailAppInfo[0].toString(),
		pass: gmailAppInfo[1].toString()
	}
});

// setup email data with unicode symbols
let mailOptions = {
	from: '"Grouper Notifications 👻" <<EMAIL>>', // sender address
	to: '<EMAIL>', // list of receivers
	subject: 'Hello ✔', // Subject line
	text: 'Hello world ?', // plain text body
	html: '<b>Hello world ?</b>' // html body
};


module.exports = {
	// send mail with defined transport object
	sendMail: function(emailAddress){
		mailOptions.to = emailAddress;
		transporter.sendMail(mailOptions, (error, info) => {
		if (error) {
			return console.log(error);
		}
		console.log('Message %s sent: %s', info.messageId, info.response);
	})},
	tester: function(emailAddress){
		mailOptions.to = emailAddress;
		console.log(mailOptions.to);
	},
	sendAddUserNotification: function(eventObj, addObj){

		mailOptions.to = eventObj[0].eventCreator
		console.log(mailOptions.to);
		mailOptions.subject = "New Person Coming To Your Event!!"
		mailOptions.text = "Hello!\n "+addObj.name+" was added to your event:"+eventObj[0].eventName+
		" on "+addObj.eventDate+". To get in contact with them to make a plan you can email them at: "+addObj.email+
		"! \n\n Thank You, \n\t Grouper Notifications"
		transporter.sendMail(mailOptions, (error, info) => {
		if (error) {
			return console.log(error);
		}
		console.log('Message %s sent: %s', info.messageId, info.response);
	});
	}
};<commit_msg>Email Formatting for Adding Users<commit_after>'use strict';
const nodemailer = require('nodemailer');

/* 
*  Get the app info here because I don't want this to be on GitHub
*  Ask Dave for this information and don't upload the file to GitHub...
*  I will deny your pull request if you have this info in your directory.
*/
var fs = require('fs');
var gmailAppInfo = fs.readFileSync('GmailAppInfo.txt', 'utf8');
gmailAppInfo = gmailAppInfo.split('\n');

// create reusable transporter object using the default SMTP transport
let transporter = nodemailer.createTransport({
	service: 'gmail',
	auth: {
		user: gmailAppInfo[0].toString(),
		pass: <PASSWORD>[1].toString()
	}
});

// setup email data with unicode symbols
let mailOptions = {
	from: '"🐟 Grouper Notifications 🐟" <<EMAIL>>', // sender address
	to: '<EMAIL>', // list of receivers
	subject: 'Hello ✔', // Subject line
	text: 'Hello world ?', // plain text body
	html: '<b>Hello world ?</b>' // html body
};


module.exports = {
	// send mail with defined transport object
	sendMail: function(emailAddress){
		mailOptions.to = emailAddress;
		transporter.sendMail(mailOptions, (error, info) => {
		if (error) {
			return console.log(error);
		}
		console.log('Message %s sent: %s', info.messageId, info.response);
	})},
	tester: function(emailAddress){
		mailOptions.to = emailAddress;
		console.log(mailOptions.to);
	},
	sendAddUserNotification: function(eventObj, addObj){

		mailOptions.to = eventObj[0].eventCreator
		console.log(mailOptions.to);
		mailOptions.subject = "New Person Coming To Your Event!!"
		mailOptions.text = "Hello Grouper User!\n "+addObj.name+" was added to your event:"+eventObj[0].eventName+
		" on "+addObj.eventDate+". To get in contact with them to make a plan you can email them at: "+addObj.email+
		"! \n\n Thank You, \n\t Grouper Notifications"
		mailOptions.html = '<b>Hello Grouper User!</b><br><br>' +addObj.name+" was added to your event:\'"+eventObj[0].eventName+
		"\' on "+addObj.eventDate+". To get in contact with them send them an email at: "+addObj.email+
		"! <br><br> Thank You,<br>Grouper Notifications"
		transporter.sendMail(mailOptions, (error, info) => {
		if (error) {
			return console.log(error);
		}
		console.log('Message %s sent: %s', info.messageId, info.response);
	});
	}
};
{'fraction_non_alphanumeric': 0.14565826330532214, 'fraction_numerical': 0.0025676937441643324, 'mean_word_length': 4.342892768079801, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, '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': '4567485', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1382, 'n_words': 429}