smtp: use the upload buffer size for scratch buffer malloc