Fixed send function (removing whitespaces from input string)