Sending the email is not illegal.
But keep in mind that in many companies, especially larger ones, any and all email that an employee sends or receives in a corporate account may be read by company systems or people without the employee's specific knowledge. That includes
- automatic spam and virus filtering
- management looking for signs of problems (of many different types)
- systems to monitor compliance with government regulations (e.g., against insider trading, sensitive information transfer to outside sources, etc.)
- employees covering for others (e.g., Alice is on vacation but her job is critical and some people email her directly instead of support@ so she auto-forwards all her email to Bob so that he can catch any problems while she is out), etc. So anything you send to your ex-girlfriend could be read by many different people.
In other words, with corporate email there is no expectation of privacy.
In some companies, personal email on a corporate account is either technically forbidden (but allowed within reason as long as it is not disruptive) or is specifically limited (e.g., personal only, no messages regarding other employment even if it is not in conflict with the employee's contract and position, no discussion of company business with outsiders, etc.) As a result, while your ex-girlfriend will likely receive your messages, she might have employment related reasons to not respond, even if she has responded via corporate email in the past.