SMTP: Fix edge case where nothing was sent when no authentication was needed. Relates to #1845.