Danielle* didn't expect her workday to begin with her male coworkers publicly joking about rape.

Danielle is an engineer at Apple — and like many of the women in the company, she works on a male-dominated team. On a Tuesday morning in July, when men on her team began to joke that an office intruder was coming to rape everybody, Danielle decided to speak out about what she described as the "very toxic atmosphere" created by jokes about violent sexual assault.

The coworker who first made the joke apologized, repeatedly assuring her that something like this wouldn't happen again. But his assurances did little to instill confidence. This wasn't the first time Danielle had allegedly seen something like this happen on her team, nor was it the first time she complained that the office culture at Apple was, in her words, toxic. Despite repeated formal complaints to her manager, Danielle said, nothing ever changed.

But this rape joke was the final straw. The next day, Danielle escalated her complaint about the offense to the very top: Apple CEO Tim Cook.

"Rape jokes in work chat is basically where I completely draw the limit," she wrote to Cook in an email obtained by Mic. "I do not feel safe at a company that tolerates individuals who make rape jokes."

Danielle wrote that she did not receive a response to her formal complaint to Cook — even as he made headlines for responding to emails from random Apple customers.

To protect their identities and employment, Mic will not use the names of women whose accounts it obtained. Pseudonyms are marked with an asterisk on first use.

According to Apple's most recent diversity report, women make up 32% of its global workforce. About a dozen of those women joined Danielle on a recent email thread, shared with Mic by an Apple employee, in which they commiserated on their experiences working for a company dominated by men. The thread included stories of discrimination and workplace harassment, and was sparked after another Apple employee shared Danielle's experience in an attempt to galvanize the necessary support to mobilize and enact change.

This thread is just one part of over 50 pages of emails obtained by Mic from current and former Apple employees.

Allegations of toxic work environment

A former Apple employee was driven by her harrowing experience at Apple to email a "plea to help" to the company's Business Conduct contact, according to an email obtained by Mic. In the email, she notes her extreme discomfort during a particular meeting at which more than a dozen men — and no other women — attended.

"The conversation turned to all of the men being dismissive about their wives and their significant others," she wrote. "I felt very uncomfortable of the reality that I was the only woman in the room as all of my male coworkers stereotyped women as nags and this was not countered by my manager as being inappropriate."

Her manager did not take any steps to end the conversation, she wrote.

Describing another incident, she wrote, "I was walking back to my cube from the break room and passed a group of managers exiting a meeting. The Area Manager told me to smile as I walked past."

"While this is a small thing, it was notable as this is one of the most commonly reported forms of subtle sexism."

Eventually, the late-night shifts she was assigned meant she worked in isolation to the point that the office's motion-sensitive lights would turn off. "I am working in darkness for the evening hours of my shift," she wrote. The closest person to her workstation in the building was "nearly six rows of dark, empty offices away."

Feeling unsafe "as the only female on the floor," she asked management that she at the very least be moved to a cubicle closer to another person working in the building, an Apple employee familiar with her story told Mic. The request was denied. Fed up, the woman quit her job at Apple, trading her position at one of the world's most iconic companies in favor of a job riding a bicycle.

In another email obtained by Mic, a former Apple contractor wrote to talk about her interview for a full-time position at Apple. The man who interviewed her, she wrote, opened with the line, "You're not technical, are you?"

"If he were familiar with my actual work, he could not in good conscience say such a thing," she wrote. "My response to his condescension was to discuss advanced learning theory and the use of metaphor and semiotics along with the theoretical foundations of design patterns."

She didn't get the job.

The complaints of gendered harassment weren't limited to women. A male former Apple employee sent a complaint of workplace harassment to multiple people at the company, including Cook.

"Why I felt I would be retaliated against was the fact that I would consistently be referred to as an emotional man that resembled having the qualities of a woman," he wrote in the email obtained by Mic. "Any male can tell you that being referred to as a woman is an insinuation that you are not strong enough or stable enough to handle the difficulties of life or work in the way a man can."

"One particular comment that stood out was that I was continually told that I was on my 'man period,'" he wrote. "This is a statement used to push the fact that women while menstruating are emotional and cannot be depended on to do work or be rational while in this state. Therefore, if I was a man on my period then I was seen as inferior and an emotional mess just like most women are once a month."

Fear of retaliation

Claire* said that she faced retaliation from her male colleagues for reporting them. According to Claire, when someone finally came in to investigate the issue of the harassment she reported up, Apple admitted to her that she was in a hostile work environment. But instead of working to ameliorate her situation, she said, the company gave her a choice: stay in the position or take a lower ranking, lower paying job on another team.

Claire took the demotion.

Passed over for leadership

In other emails Mic obtained, women at Apple discussed being passed over for leadership positions, a corporate tier at Apple (and most of Silicon Valley) that struggles with racial and gender equality compared to the rest of the company.

Amanda*, who was also in the thread, told Mic she was never given the opportunity to apply for two advanced positions she was "more than qualified for." The jobs were never posted publicly, and her male boss selected two men to fill them.

"White male privilege runs unchecked," one woman told the group. "The worst part is, you don't know who to trust and who you can reach out to without continued harassment and retaliation. I am beyond discouraged and disheartened at my treatment and the lack of follow-up."

That futility is a prevailing sentiment in the thread. Danielle, who took time off from work to deal with stress from the rape joke incident, wrote after her return, "As far as I can tell, nothing of any serious consequence has happened in the last month. Apparently I'm supposed to return to work as normal? Nothing changes?"

Legal action

Fed up with the countless stories of misconduct and frustration, Amanda finally decided to take legal action to make sure women at Apple would have a voice. On Aug. 4, she filed a complaint with the Department of Fair Employment and Housing, which dual-files with the Equal Employment Opportunity Commission, to investigate how Apple treats women in leadership positions.

Amanda is one of several women who have emailed Cook in hopes that the CEO will acknowledge the discrimination she and her colleagues feel as Apple employees. According to Amanda, Cook has yet to respond.

Those who remain at the company continue to report toxic environments and incidents, hopeful that they will be resolved. Others, frustrated by a lack of change, resort to quitting.

"With such love for a company that does so much good, it is with a heavy heart that I declare my resignation from Apple," a former employee wrote in an email obtained by Mic. "Despite all attempts to seek justice within this corporation, the cries of several minority employees about the toxic and oppressive environment have gone unanswered. I have witnessed the complete and utter disenfranchising of the voices of men and women of color, and the fault lies not only in the direct management staff but in the response of those tasked with protecting employee rights. I write this letter hoping to highlight the areas that these departments have failed to properly support employees and as such have hence left Apple, Inc. culpable for various EEOC and ethical violations."

According to Claire*, "several people" who have quit, citing a "white, male, Christian, misogynist, sexist environment," were not given exit interviews. "Their departure is being written up as a positive attrition," she told Mic.

Work to be done

Though Apple declined to comment on any of the specific claims in this story, a spokeswoman said, "Apple is committed to treating everyone with dignity and respect. When we receive complaints or hear that employees are concerned about their work environment, we take it very seriously and we investigate claims thoroughly — as we have each of the matters you describe. If we find behavior to be at odds with our values, we take action. Out of respect for the privacy of our employees, we do not discuss specific matters or their resolution."

Apple has publicly declared its commitment to employing more women and minorities. But even if the company greatly increases its hiring of women and minorities, if those employees are subject to race- and gender-based harassment in the workplace, they won't succeed with the same consistency as their male or white counterparts.

Harvard Business Review conducted a study as to why women pursuing engineering end up quitting to pursue another field, pointing to a "hegemonic masculine culture of engineering" as a common reason for their departure from the field.

"Efforts focused only on changing the curriculum are insufficient because they simply reproduce the norms and practices of the profession," Harvard Business Review wrote in August. "In order to curb the high rates of women leaving the field, engineering programs need to address gendered tasking and expectations among teams, in class and at internship work sites. The culture has to learn to take women seriously."

As with the engineering field — a workforce made up of only 13% women — women and minorities in toxic work environments within Apple won't see radical change if the conversation continues to laser-focus on simply hiring more individuals from underrepresented groups. It's about hiring these individuals into spaces where they can feel safe and comfortable to thrive without retaliation.

According to Claire, some people make sarcastic comparisons between what they believe to be toxic conditions at Apple and Foxconn, the Chinese manufacturing plant that has admitted to violating child labor laws and saw 18 attempted employee suicides in 2010.

"The running joke," she said, "is that Foxconn has nothing on Apple."

Please send tips and share your story by emailing melanie@mic.com.