A chronically ill Oxford man has avoided jail after breaching a restraining order to send his ex-girlfriend emails.