save message in database after sending