Add sendmail feature to gen patches