A node-module to automatically send excel time-sheets
npm install -g time-sheet-mailer
tsm config
edit the existing demo-config according to your needs.
$project
in email.subject will be replaced by the projectname.
This will try to open the tsm-config with your prefered editor, but falls back to vim if it can't find one. You can also specify the editor to use in an environment-variable, like so:
EDITOR=nano tsm config
If you use google, and don't have 2FA, you might need to allow less secure apps here
If you use google, and do have 2FA, you need to create an app-password here
tsm dryrun
This will not actually send emails, but show you what would be sent.
tsm run
The config-file has the following format:
{
"directory": "/path/to/your/timesheets",
"smtp": {
"host": "smtp.gmail.com",
"port": 465,
"username": "YourSMTPUsernameHere",
"password": "YourSMTPPasswordHere"
},
"email": {
"sender": "YourSender NameHere",
"subject": "Timesheet for $project"
},
"mailadresses": {
"boss": "boss@mycompany.com",
"team": "team@mycompany.com",
"accounting": "accounting@mycompany.com"
},
"projects": {
"CoolProject": ["team"],
"InternalProject": ["boss", "team"],
"YourprojectNameHere": ["accounting", "boss"]
}
}