Message ids

Tried to fix the cid: problem + provide safer id generation
does it really throw a warning ? This is not documented in the PHP documentation AFAICT