If you never clear your stringstream, text will accumulate in it. To clear a stringstream, call convert.str("").
Better: use a new stringstream instance for each conversion. Even better: put conversion code in a dedicated function. Even better if you compiler allows it: use std::to_string.
PS: you forgot the attachment.