Yeap and his other hit “ Never Gonna Fall in Love Again” was based on the melody from Rachmaninoff’s 2nd symphony 2nd movement. Eric Carmen had a training as a classical pianist and it shows in the long piano interlude in the extended version of “All By Myself. Carmen got himself into some legal trouble because he thought Rachmanioff’s music was out of copy right but he was mistaken so had to pay royalties to the Rachmanioff estate.
The bit of theft from the second movement of the Second Symphony came from Neil Diamond, who appropriated a chuck of the mid portion of the second movement for "You Don't Bring Me Flowers Anymore." Diamond even kept the original key of C Major.
It was in the public domain in America. He never hid the fact that he used the melody.