Human-resources software company Zenefits had to send an uncomfortable HR email to their own to staff recently following a few incidents within their San Francisco office.

The startup, which launched less than three years ago but was evaluated last May at $4.5 billion, was forced to ban staff from drinking in the office after some wild parties that involved employees having sex in the stairwell of the building, according to emails obtained by The Wall Street Journal.

The emails, sent around last summer by Zenefits Director of Real Estate and Workplace Services, Emily Agin, described the situation of employees having sex at work as 'crude behavior'.

'It has been brought to our attention by building management and Security that the stairwells are being used inappropriately….Cigarettes, plastic cups filled with beer, and several used condoms were found in the stairwell. Yes, you read that right,' the email said.

New CEO, new rules: Incoming Zenefits CEO David Sacks has banned employees from drinking in the office after a series of instancing involving 'crude behavior', including condoms being found in the stairwell

Party atmosphere: The company had a reputation for its party atmosphere. Seen here is an image from their Facebook page. There is no suggestion the employees pictured were involved in any bad behavior

In May last year Zennefits announced it had raised $500 million in venture funding, giving it a valuation of $4.5 billion, making its trajectory to the 'Unicorn Club' of start-ups valued at $1 billion or more impressively quick

'Do not use the stairwells to smoke, drink, eat, or have sex.

'Please respect building and company policy and use common sense…'

The alcohol ban was officially brought in last week by Zenefits's new chief executive, David Sacks.

Sacks said it is important to cultivate a more mature work atmosphere in a staff memo that was sent around last Wednesday.

The memo acknowledged how 'it is too difficult to define and parse what is 'appropriate' versus 'inappropriate' drinking in the office'.

Some reports said that sales staff would gather together and do a shot when a new client was signed.

Indeed the party culture was blamed for the exit of Sacks' predecessor, Parker Conrad, as CEO at the start of the month.

In announcing Conrad's resignation to staff in a memo, Sacks pointedly said: 'The fact is that many of our internal processes, controls, and actions around compliance have been inadequate, and some decisions have just been plain wrong. As a result, Parker has resigned.'

Party town: Seen here is the offices of Zenefits in San Francisco. The company had something of a reputation for its internal party atmosphere

In commenting on the alcohol ban on Monday, Zenefits spokesman Kenneth Baer said it was all part of taking the company forward following the introduction of Sacks.

Baer said in a statement to the WSJ: 'As Zenefits' new CEO has made clear, it is time to turn the page at Zenefits and embrace a new set of corporate values and culture. Zenefits is now focused on developing business practices that will ensure compliance with all regulatory requirements, and making certain that the company operates with integrity as its number-one value.'

In May last year Zennefits announced it had raised $500 million in venture funding, giving it a valuation of $4.5 billion and confirming a drop in appetite among venture-backed companies for initial public offerings.

The news made the company's trajectory to the 'Unicorn Club' of start-ups valued at $1 billion or more impressively quick, even by Silicon Valley standards. It had annual recurring revenue of $20 million by late last year.

Once companies reach that stage, founders say, some of their biggest expenses lie in sales and marketing as they attempt to expand into new markets and outdo competition.

Zenefits, a human-resources software company, had to ban office sex after used condoms were found in the stairwells. Alcohol was also banned in the workplace. Seen here is a photo from their Facebook. There is no indication the employees pictured were involved in any bad behavior

Zenefits is no exception, a spokesman said, earmarking much of the new funding for those areas as it seeks to sustain its rapid pace of growth.

Zenefits' core services are free, and it makes money by collecting fees from insurance companies when it refers its clients for health insurance and other products. The startup hopes the new funding will help propel it to annual recurring revenue of $100 million by January 2016, the spokesman said.

Where human-resources software peer Workday targets larger businesses, Zenefits has been going after small and medium-sized firms.