Though I tend to agree with the attorneys in this thread on other issues they've recently weighed in on, I feel the need to present a different opinion for this one because some of the advice probably sounds quite scary to you and I really don't think you should lose any sleep over this. First, I'd like to address the copyright infringement issue:
Although your use of this image might technically constitute copyright infringement, I'm sure the image has not been registered with the U.S. Copyright Office. Until it is, you cannot be sued for infringing it. Additionally, if it ever is registered, your ex boyfriend probably wouldn't be the copyright claimant of the image unless he took the photo himself, so he wouldn't have standing to sue you. The photographer would have to be the one to sue you unless and until the photographer transferred rights in the image to your ex boyfriend.
Please understand that a suit for copyright infringement isn't easy and it isn't cheap. It's a federal lawsuit and in Houston the filing fee is $400. On top of that, since your infringement took place prior to the registration of the image then the only damages the copyright holder would be entitled to our "actual damages." In this situation, such damages would be very minor; probably less than a few hundred dollars. Whereas the suit would cost several thousand dollars for him to prosecute [with a halfway decent copyright attorney.] I just don't see it happening as a practical matter... People don't generally spend several thousand dollars to sue someone when they know they can only collect a few hundred unless they're very rich and very, very angry for a very long time.
As far as criminal impersonation of him goes, it all turns on the intent to harm (I'm focusing on harm since you do not appear to have been intimidating, threatening or attempting to defraud). This is governed by section 33.07 of the Texas Penal Code. Overall, it's quite similar to the California statute already cited here. Personally, I can say that I've spent enough time in Houston to know that the cops there usually have better things to do than deal with this. Especially if it's in the context of a domestic dispute. For your ex-boyfriend to take the time to go after you, AND find the right cop/prosecutor combination to move forward with the charges against, you would be highly unlikely in my opinion.
To back up and at least answer the subject of your question directly, my answer would be, no, you cannot use a picture online just because someone e-mailed that picture to you. But the specifics of your situation lead me to believe that it is extremely, extremely unlikely that you would be criminally charged or sued for copyright infringement.
That having been said, I would also advise you not to repeat that behavior and don't flaunt the fact that you have already done what you've done. Good luck to you.
Depending on how you use the picture, he might have recourse to get you to stop using the picture. If you are questioning whether it is legal to be doing, you should probably consult an attorney in your jurisdiction before continuing to post his picture.
This answer does not create an attorney-client relationship. Please contact a lawyer qualified in your jurisdiction to discuss your situation in confidence. The guidance I have given describes only general legal concepts without knowing the exact factual details of your situation.
Q: "Is it illegal for me to post the picture that he sent me online?"
R: Really? You're worried about the consequences of posting the picture and not your unlawful IMPERSONATION of your former boyfriend? I do not know the Texas law that applies, but in California it's a CRIME to "knowingly and without consent credibly impersonates another actual person through or on an Internet Web site or by other electronic means for purposes of harming, intimidating, threatening, or defrauding another person ... ." California Penal Code section 528.5.
As for you publishing the photograph, yes, that is unlawful as well [specifically, copyright infringement] because you neither own the copyright in the photograph or have a license from whoever took the photograph.
You need to discuss what you've done in private with your own civil litigation attorney.
The above is general information ONLY and is not legal advice, does not form an attorney-client relationship, and should NOT be relied upon to take or refrain from taking any action. I am not your attorney. You should seek the advice of competent counsel before taking any action related to your inquiry.
You just admitted to a Texas crime and to copyright infringement. You are in big trouble if your ex wants to punish you for this. You have done something that seems to me very impulsive and immature . Revenge can backfire. You need to take that site down immediately and see a civil litigation attorney that also handles criminal defense and domestic relations.
I am not your lawyer and you are not my client. Free advice here is without recourse and any reliance thereupon is at your sole risk. This is done without compensation as a free public service. I am licensed in IL, MO, TX and I am a Reg. Pat. Atty. so advice in any other jurisdiction is strictly general advice and should be confirmed with an attorney licensed in that jurisdiction.