Hello and thank you for your question,
Although pneumonia can be dangerous it is unlikely to be life-threatening especially if he doesn't have lung disease and if he is not a smoker.
If he is being treated with antibiotics (especially on the outpatient basis, not in the hospital), he is going to recover in about 1 week. If he is hospitalized for pneumonia, treatment may take a bit longer with IV antibiotics but again, recovery is usually 100%.
His heart condition should not interfere or have any negative effects on the pneumonia treatment.
I hope you find this information helpful. Please feel free to follow-up with any other questions you might have.
If you are satisfied with the answer, please click 'accept' button so that I may get credit for my work.
I wish your boyfriend a speedy recovery.