The first recorded submarine attack was arguably in the 18th century during the American revolution when the 'Turtle' attacked HMS Eagle, albeit unsuccessfully. There is some dissension over whether the attack actually took place. The next attack took place during the American civil war when CSS Hunley attacked USS Housatonic. Housationc was sunk but unfortunately so was Hunley. Recent examinations of the remains of the crew indicate that they were killed by the shock of their own explosive device attached to Housatonic. As far as I know there were no other submarine actions in the 19th century.