<commit_before>Gmail Sender
=======

Sends emails by a given Gmail account.

Installation
-------

npm install gmail-sender

Usage
-------

var Gmailer = require("gmail-sender");

// any options can be set here...
Gmailer.options({
	smtp: {
		service: "Gmail",
		user: "<EMAIL>",
		pass: "<PASSWORD>"
	}
});

// any options set here, will overwrite options from above...
Gmailer.send({
    subject: "Demo Mail",
    template: "./assets/templates/demo.html",
    from: "'Gmail Sender'",
    to: {
        email: "<EMAIL>",
        name: "Five",
        surname: "Johnny"
    },
    data: {
        name: "Five",
        surname: "Johnny",
        id: "28329m82198j"
    },
    attachments: [
        {
            fileName: "html5.png",
            filePath: "./assets/attachments/html5.png",
            cid: "html5@demo"
        }
    ]
});	

Configuration
-------

Any options can be set by both methods options() and send(). With options() you can define default configuration, e.g. from an extra local file, that is not in a repository. All options to send() will overwrite default.

The folder assets holds HTML mail template and attached files.<commit_msg>Readable layout<commit_after>Gmail Sender
=======

Sends emails by a given Gmail account.

Installation
-------

	npm install gmail-sender

Usage
-------

	var Gmailer = require("gmail-sender");

	// any options can be set here...
	Gmailer.options({
		smtp: {
			service: "Gmail",
			user: "<EMAIL>",
			pass: "<PASSWORD>"
		}
	});

	// any options set here, will overwrite options from above...
	Gmailer.send({
    	subject: "Demo Mail",
    	template: "./assets/templates/demo.html",
    	from: "'Gmail Sender'",
    	to: {
        	email: "<EMAIL>",
        	name: "Five",
        	surname: "Johnny"
    	},
    	data: {
        	name: "Five",
        	surname: "Johnny",
        	id: "28329m82198j"
    	},
    	attachments: [
        	{
            	fileName: "html5.png",
            	filePath: "./assets/attachments/html5.png",
            	cid: "html5@demo"
        	}
    	]
	});

Options
-------

Any options can be set by both methods `options()` and `send()`. With `options()` you can define default configuration, e.g. from an extra local file, that is not in a repository. All options to `send()` will overwrite default.

The folder assets holds HTML mail template and attached files.
{'fraction_non_alphanumeric': 0.1483050847457627, 'fraction_numerical': 0.011016949152542373, 'mean_word_length': 2.270083102493075, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6754405', 'n_tokens_mistral': 783, 'n_tokens_neox': 739, 'n_words': 236}