@main[] $sBody[Тело письма] $sAttachFileName[235_attach.txt] $fText[^file::load[text;$sAttachFileName]] $fBinary[^file::load[binary;$sAttachFileName]] 1 ^do[; $.text[$sBody] $.x-mailer[Parser 3] ] 2 ^do[windows-1251; $.text[$sBody] $.html{

$sBody

} ] 3 ^do[windows-1251; $.text[$sBody] $.file[$fText] $.file2[$fBinary] ] 4 ^do[windows-1251; $.text[$sBody] $.file[$fBinary] $.message[ $.from[from-message@parser3test] $.to[to-message@parser3test] $.charset[windows-1251] $.subject[Заголовок вложения] $.text[Тело вложения] $.file[$fText] ] ] 5 ^do[windows-1251; $.text[$sBody] $.file[ $.value[$fText] $.content-id[C-ID] $.format[uue] ] ] @postprocess[text] ^1251[] # replace boundary by fixed string $result[^text.match[(-{10,})[0-9a-fA-F]+(--)?][g]{${match.1}boundary-value$match.2}] @do[sCharset;hData]
^mail:send[
	^hash::create[$hData]
	$.from[from@parser3test]
	$.to[to@parser3test]
	^if(def $sCharset){
		$.charset[$sCharset]
	}
	$.subject[Заголовок]
	$.print-debug(1)
]