I'm not sure if this is a mime problem or an smtp problem, but...
If you use the MIME package to create a text/plain without a newline on the end, then use smtp::sendmessage to send it, it appears to hang after sending the message in the DATA command. I suspect the "close the data" period is winding up at the end of the final line instead of at the start of a line by itself.
Sample code:
# The first message goes
# The second message hangs.
package require mime
package require smtp
proc sendmail {from to bcc subject body {queue 1}} {
set mail [mime::initialize -canonical text/plain -string $body]
smtp::sendmessage $mail \
-debug 1 \
-header [list From $from] \
-header [list To $to] \
-header [list BCC $bcc] \
-header [list Subject $subject]
mime::finalize $mail
}
puts "Testing with newline..."
sendmail "dnew@example.com" "dnew@example.com" "" \
"Subject One" "Test body\nNewline present\n"
puts "Message one sent...\n"
after 10000
puts "Testing without newline..."
sendmail "dnew@example.com" "dnew@example.com" "" \
"Subject two" "Test body\nNewline absent"
puts "Message two sent..."