We are asking because we suspect that your server code (what you posted) is throwing an exception, and that different browsers are interpreting a combination of partial HTML code plus a 500-level error code differently. You never have to configure the browser to receive normal HTML responses, so it looks like you aren't sending a normal HTML response.
So there are several things
you should be looking into. Does your server code throw an exception, or is the e-mail sent successfully? Are you sending any HTML at all as your response? What is the response code sent by your code: 200 for normal, or something else? You'll notice that all of this is at the server side; the browser should have nothing to do with it.