Last active
August 29, 2015 14:02
-
-
Save maxandersen/b35c558ffbf67b4673ec to your computer and use it in GitHub Desktop.
how to send pdfs to a certain picky expense system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install "sendEmail" | |
on OSX I did that with 'brew install sendemail' | |
on fedora/red hat 'yum sendEmail' should work too (not tested). | |
http://caspian.dotconf.net/menu/Software/SendEmail/ | |
Then use the script below and do this in the dir with your pdf's for the script (it will just take all *.pdf). | |
sh sendreceipts.sh <barcode> | |
Note: you need to escape the barcode i.e. if I had DTID-99$CPID-353560\ | |
I use | |
sh sendreceipts.sh DTID-99\$CPID-353560\\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sendEmail -f me@somecompany.com -u "$1" -s smtp.company.com -t expenses@company.com -m "/peace" -v -a *.pdf | |
on fedora use
yum install sendmail
otherwise you won't find sendEmail /and I know that it is different thing ;) / or you need to download sources from http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz
Cool stuff! Does someone know how to sync the PnT content with local folders ?
@maxandersen, it should be "brew install sendemail" on line 3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried various combinations of sendmail, mailx, mutt, etc. but they all was resulting in too much pain or failed mails. With above i've had 100% success rate with 4 expense reports ;)