Skip to content

Instantly share code, notes, and snippets.

@maxandersen
Last active August 29, 2015 14:02
Show Gist options
  • Save maxandersen/b35c558ffbf67b4673ec to your computer and use it in GitHub Desktop.
Save maxandersen/b35c558ffbf67b4673ec to your computer and use it in GitHub Desktop.
how to send pdfs to a certain picky expense system
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\\
sendEmail -f me@somecompany.com -u "$1" -s smtp.company.com -t expenses@company.com -m "/peace" -v -a *.pdf
@maxandersen
Copy link
Author

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 ;)

@mareknovotny
Copy link

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

@rmarins
Copy link

rmarins commented Jun 13, 2014

Cool stuff! Does someone know how to sync the PnT content with local folders ?

@xcoulon
Copy link

xcoulon commented Jul 21, 2014

@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