People who have had a heart attack or have known risk factors can still take medication for ED. ... Pills that are safe for ED after a heart attack sildenafil (Viagra) vardenafil (Levitra) tadalafil (Cialis) Sep 28, 2020