rewrote sendEmail so arguments can be passed though command line or stored in env vars
fix argument indices
added Profile