Message ids

Tried to fix the cid: problem + provide safer id generation
simple if  for any reason a hoster has disabled for security reason it will throw a useless warning (on funciont_exists) and return false