Yes all part is great, only subject is wrong. I have code Msg := Tmimemess.Create; L := TStringList.create; try //AssignFile(f,WorkDirectory + mStatusFile); //Rewrite(f); tmc.WriteInfo('Mail generate begin',itInformation,vlInformation); tmc.MailStatus := tmc.MailStatus + '+mail_begin'; tmc.BeginProcess; // msg.header.CharsetCode := ISO_8859_2; part := msg.AddPartMultipart('mixed',nil); //s:= CharsetConversion(msubject,CP1250,ISO_8859_2); s := EncodeTriplet(mSubject, '=', SpecialChar + NonAsciiChar + CzechChar); s:= s + #0; // Msg.Header.EncodeHeaders(); //c := IdealCharsetCoding(s, UTF_8, IdealCharsets); //s := InlineEncode(s, UTF_8, c); msg.header.subject := s; msg.header.from := mFrom; msg.header.tolist.add(mto); if mcc <> '' then msg.Header.CCList.add(mcc); msg.Header.CustomHeaders.Add('Keywords: www.BSoftware.biz, sendmailcmdline, sendmailinifile'); msg.Header.XMailer := appName + ' (' + appHome + ')' ; msg.AddPartText(mMSG,part); for fo := 0 to mfiles.Count-1 do begin s := copy(mfiles[fo],0,pos('=',mfiles[fo])-1); t := copy(mfiles[fo],pos('=',mfiles[fo])+1,255); tmc.WriteInfo('Mail add attachement. (' + s + ')',itInformation,vlDebug); // msg.AddPartBinaryFromFile('mfile.',part); tmp := TMemoryStream.Create; try tmp.LoadFromFile(t); Msg.AddPartBinary(tmp, s, part); finally tmp.Free; end; end; // Msg.Header.EncodeHeaders(); tmc.WriteInfo('Mail encode',itInformation,vlDebug); msg.EncodeMessage;
On Wed, Nov 2, 2011 at 12:08 PM, Lukas Gebauer <gebyl...@mlp.cz> wrote: > > > please help me with charset coding mail subject. > > How i use in subject "czech" charset ?? > > And what is your problem? > > Use TMimeMess class for build message. It have subject property as > ansistring, and Synapse do all encoding be self. You not need to do any > special handling. (In case of Czech, Ansistring is CP1250, synapse recode > it to ISO-8859-2 and encode it to RAW mail message.) > > It is because I am lazy Czech programmer. ;-) > > > > -- > Lukas Gebauer. > > http://synapse.ararat.cz/ - Synapse Delphi and Kylix TCP/IP Library > http://geoget.ararat.cz/ - Geocaching solution > > > > ------------------------------------------------------------------------------ > RSA® Conference 2012 > Save $700 by Nov 18 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > synalist-public mailing list > synalist-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/synalist-public ------------------------------------------------------------------------------ RSA® Conference 2012 Save $700 by Nov 18 Register now! http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public