#                     #
# convert/ms-mail.tcl #
#######################

#############################################################################
#                                                                           #
# This file contains functions to convert a message to fit with an SMTP-    #
# gateway for PC MS-Mail. Files are encoded in uuencode and text converted  #
# to CodePage437.                                                           #
#                                                                           #
#############################################################################


set PART_NUMBER 0
topmessnode
while {1 == 1} {
	rmspecheader
	set MTYPE [gettype]
	case $MTYPE in {
	
	TEXT	{
			do_decode
			tocharset  "CP437"
		}

	BINHEX	{
			set JUNK "BINHEX"			
		}

	MULTIPART {
			set JUNK "MULTIPART"
		}

	default	{
			do_code "UUENCODE"
		}

	}
	set A [nextmessnode]
	if {$A < 1} {
		break
	}
	set PART_NUMBER [expr $PART_NUMBER+1]
}
