Index: modules/mime/mime.tcl
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/mime/mime.tcl,v
retrieving revision 1.29
diff -u -r1.29 mime.tcl
--- modules/mime/mime.tcl	11 Apr 2003 01:41:40 -0000	1.29
+++ modules/mime/mime.tcl	3 May 2003 09:00:49 -0000
@@ -1767,16 +1767,16 @@
 
     set result ""
     if {[string compare $state(version) ""]} {
-        append result "MIME-Version: $state(version)\n"
+        append result "MIME-Version: $state(version)\r\n"
     }
     foreach lower $state(lowerL) mixed $state(mixedL) {
         foreach value $header($lower) {
-            append result "$mixed: $value\n"
+            append result "$mixed: $value\r\n"
         }
     }
     if {(!$state(canonicalP)) \
             && ([string compare [set encoding $state(encoding)] ""])} {
-        append result "Content-Transfer-Encoding: $encoding\n"
+        append result "Content-Transfer-Encoding: $encoding\r\n"
     }
 
     append result "Content-Type: $state(content)"
@@ -1786,20 +1786,20 @@
             set boundary $v
         }
 
-        append result ";\n              $k=\"$v\""
+        append result ";\r\n              $k=\"$v\""
     }
 
     set converter ""
     set encoding ""
     if {[string compare $state(value) parts]} {
-        append result \n
+        append result \r\n
 
         if {$state(canonicalP)} {
             if {![string compare [set encoding $state(encoding)] ""]} {
                 set encoding [encoding $token]
             }
             if {[string compare $encoding ""]} {
-                append result "Content-Transfer-Encoding: $encoding\n"
+                append result "Content-Transfer-Encoding: $encoding\r\n"
             }
             switch -- $encoding {
                 base64
@@ -1826,9 +1826,9 @@
         }
         set boundary "----- =_[string trim [base64 -mode encode -- $key]]"
 
-        append result ";\n              boundary=\"$boundary\"\n"
+        append result ";\r\n              boundary=\"$boundary\"\r\n"
     } else {
-        append result "\n"
+        append result "\r\n"
     }
 
     if {[info exists state(error)]} {
@@ -1860,7 +1860,7 @@
                 fconfigure $fd -translation binary
             }
 
-            append result "\n"
+            append result "\r\n"
 
 	    while {($size != 0) && (![eof $fd])} {
 		if {$size < 0 || $size > 32766} {
@@ -1872,9 +1872,9 @@
 		    set size [expr {$size - [string length $X]}]
 		}
 		if {[string compare $converter ""]} {
-		    append result "[$converter -mode encode -- $X]\n"
+		    append result "[$converter -mode encode -- $X]\r\n"
 		} else {
-		    append result "$X\n"
+		    append result "$X\r\n"
 		}
 	    }
 
@@ -1893,7 +1893,7 @@
 
             switch -glob -- $state(content) {
                 message/* {
-                    append result "\n"
+                    append result "\r\n"
                     foreach part $state(parts) {
                         append result [buildmessage $part]
                         break
@@ -1902,10 +1902,10 @@
 
                 default {
                     foreach part $state(parts) {
-                        append result "\n--$boundary\n"
+                        append result "\r\n--$boundary\r\n"
                         append result [buildmessage $part]
                     }
-                    append result "\n--$boundary--\n"
+                    append result "\r\n--$boundary--\r\n"
                 }
             }
 
@@ -1917,12 +1917,12 @@
 
         string {
 
-            append result "\n"
+            append result "\r\n"
 
 	    if {[string compare $converter ""]} {
-		append result "[$converter -mode encode -- $state(string)]\n"
+		append result "[$converter -mode encode -- $state(string)]\r\n"
 	    } else {
-		append result "$state(string)\n"
+		append result "$state(string)\r\n"
 	    }
         }
 	default {
