Major League Baseball has created a hotline for people not employed by the league or teams to report harassment or discrimination after New York Mets general manager Jared Porter and Los Angeles Angels pitching coach Mickey Callaway were accused of sending lewd text messages to female reporters.

The league will also require anti-harassment and discrimination training for executives during spring training.

Porter was fired for cause Jan. 19 about nine hours after ESPN reported he sent sexually explicit, uninvited text messages and images to a female reporter in 2016 while he was working for the Chicago Cubs in their front office. Callaway was suspended and is under investigation by the Angels and MLB following allegations of inappropriate behavior toward several women who work in sports media.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

MLB's hotline will be operated by an outside third party, and complaints will be investigated either by the team involved or the commissioner's office, depending on the nature of the allegation. The hotline is also open to league or team employees.

The hotline gives individuals the right to remain anonymous, although the entry in the league's Code of Conduct says "the more information that is provided will aid in any investigation that is conducted."

MLB's Code of Conduct states that individuals experiencing harassment have "no requirement to confront an alleged wrongdoer; however, victims of inappropriate conduct may attempt to resolve issues or disagreements on their own if they choose."

If those attempts are unsuccessful or individuals don't feel comfortable addressing the situation directly, the Code of Conduct directs them to make MLB or the team aware, either through a supervisor, human resources or the legal departments.