A massive heart attack killed actor James Garner.
According to the death certificate -- obtained by TMZ -- Garner died from acute myocardial infarction.
"The Rockford Files" star died July 19 at his Los Angeles home.
The death certificate says Garner -- who also starred in "The Notebook" -- suffered from coronary artery disease.
Garner was one of the first stars to become mega-successful on both TV and in the movies. Among his many achievements ... "Maverick" -- a massive TV hit from 1957 - 1962. He co-starred with Mel Gibson in the big screen version in '94.