Hemoptysis by Heart Disorder (in general term)
While the hemoptysis is caused by the medical conditions in the lung, heart disorders may also affect pulmonary function and may cause lung disorders. Among heart disorders, congestive heart failure is the medical condition that causes pulmonary edema. In congestive heart failure, the heart muscle is not capable of pumping blood to the rest of the body which cause the accumulation of blood in the lung (consequent edema).
Symptoms include the palpitation/arrhythmia, shortness of breath, cough with frothy sputum, chest tightness and sweating. Cough may have blood-tinged sputum with pink foamy mucus, or bloody sputum in the severe cases. Symptoms are getting worse at night, and relieved by sitting up.