Add server side valdiation of message length

Adds some validation to /smsapi, server could be crashed if e.g. source
was not set.