I use a similar coding technique as you have shared, except the ODS parameter parameter is coded to prevent HTML tag truncation.
So, again, the question: are you seeing HTML code in the EMAIL you receive or a text reporting listing? Also, has the code (or something similar) ever worked previously where you send SAS-generated HTML reports via EMAIL?
And, mention again, the sending and receiving operating system environments, EMAIL client? Also, your SAS version and service pack / HOTFIX maintenance levels are something to consider.
Also, consider an attempt without the ATTACH= parameter to determine any different SAS behavior with your EMAIL content.
Scott Barry
SBBWorks, Inc.