<commit_before>
//Get mongoose model
var User = require('../models/user');
var Bestiary = require('../models/bestiary');
var Creature = require('../models/creature');
var jwt = require("jsonwebtoken");
var config = require("../config");
var nodemailer = require('nodemailer');
var url = require('url');
var creatures = require("../controllers/creatures");

var transporter = nodemailer.createTransport('smtps://' +
    config.email.address +
    ":" +
    config.email.password +
    "@smtp.gmail.com");

var sendWelcomeEmail = function(email){
    var mailOptions = {
        from: '"'+config.email.name+'" <'+config.email.address+'>',
        to: email,
        subject: 'Welcome to Critter DB',
        text: 'Thanks for joining Critter DB! I hope it helps you with all your critter management needs. Please send any feedback to me at <EMAIL> or on Github at https://github.com/haswellr/CritterDB.\n\nThanks,\nRyan'
    };
    transporter.sendMail(mailOptions,function(error, info){
        if(error)
            console.log(error);
    });
}

var sendPassword = function(email,passwordUrl){
    var mailOptions = {
        from: '"'+config.email.name+'" <'+config.email.address+'>',
        to: email,
        subject: 'Lost Password',
        text: 'You lost something! Follow this link to set your new password: '+passwordUrl+'.'
    };
    transporter.sendMail(mailOptions,function(error, info){
        if(error)
            console.log(error);
    });
}

var getRandomPassword = function() {
  function s4() {
    return Math.floor((1 + Math.random()) * 0x10000)
      .toString(16)<commit_msg>Removing . from lost password email so Mail for Windows 10 can parse the link properly. Resolves #61.<commit_after>
//Get mongoose model
var User = require('../models/user');
var Bestiary = require('../models/bestiary');
var Creature = require('../models/creature');
var jwt = require("jsonwebtoken");
var config = require("../config");
var nodemailer = require('nodemailer');
var url = require('url');
var creatures = require("../controllers/creatures");

var transporter = nodemailer.createTransport('smtps://' +
    config.email.address +
    ":" +
    config.email.password +
    "@smtp.<EMAIL>");

var sendWelcomeEmail = function(email){
    var mailOptions = {
        from: '"'+config.email.name+'" <'+config.email.address+'>',
        to: email,
        subject: 'Welcome to Critter DB',
        text: 'Thanks for joining Critter DB! I hope it helps you with all your critter management needs. Please send any feedback to me at <EMAIL> or on Github at https://github.com/haswellr/CritterDB.\n\nThanks,\nRyan'
    };
    transporter.sendMail(mailOptions,function(error, info){
        if(error)
            console.log(error);
    });
}

var sendPassword = function(email,passwordUrl){
    var mailOptions = {
        from: '"'+config.email.name+'" <'+config.email.address+'>',
        to: email,
        subject: 'Lost Password',
        text: 'You lost something! Follow this link to set your new password: ' + passwordUrl
    };
    transporter.sendMail(mailOptions,function(error, info){
        if(error)
            console.log(error);
    });
}

var getRandomPassword = function() {
  function s4() {
    return Math.floor((1 + Math.random()) * 0x10000)
      .toString(16)
{'fraction_non_alphanumeric': 0.15167173252279637, 'fraction_numerical': 0.00729483282674772, 'mean_word_length': 3.246451612903226, 'pattern_counts': {'":': 2, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 2, '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': '4198771', 'n_tokens_mistral': 1007, 'n_tokens_neox': 976, 'n_words': 261}