Question: My employer offers an ESPP with the following details:

* 15% discount
* Max contribution is 15% of base salary
* Purchase transaction occurs on the last business day of the month
* Transaction settles 3 days after purchase
* No obligation to hold the stock for minimum duration
* No restrictions on sell timing (except during earnings lock-out period)
* Brokerage fees
	+ $0.05 per share sold (approximately 0.08% of the stock price today)
	+ $0 per share bought

Given these parameters...

What is the safest way to play the ESPP?

What is (likely) the most lucrative way to play the ESPP?

Assume I contribute the maximum amount allowable.
Assume I can hold the stock for up to you year before I may need to cash it out.

Answer: 
Short answer is to put the max 15% contribution into your ESPP.

Long answer is that since you want to be saving as much as you can anyway, this is a great way to force you to do it, and pick up at least a 15% return every six months (or however often your plan makes a purchase). I say at least because sometimes an ESPP will give you the lower of the beginning or end period stock price, and then a 15% discount off of that (but check the details of your plan). If you feel like your company's stock is a good long term investment, then hold onto the shares when purchased. Otherwise sell as soon as you get them, and bank that 15% return.
A 15% discount does not necessarily mean it is a good investment. 
The stock price can go down at any point. 15% discount might mean you
are getting a little better deal than the average cat.