Hi, can someone help me to fix the code ..
... how can I send mail in HTML with Attachment .. better look at screenshots to understand my problem.

.. with attachment .. I have problems ??!!!The Code:
Code:
; Header -----------------------------------------------------
MsgBody.s = ""
MsgBody + "<div style='background-color:#F0F8FF;font-family:verdana;padding:6px;border-radius:3px;border:2px solid #72B68F;'>"
MsgBody + "<h3 style='text-align:center;color:Green;'><ins> TEST </ins></h3>"
; """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
; Window Header -----------------------------------------------
MsgBody + "<div style='opacity:0.9;background-color: #72B68F; border-radius:3px;border:1px solid #505050; padding: 5px;'>"
MsgBody + "<font size='2' color='#000000'><i><b> NAME1: </b></i></font>"
MsgBody + "<font size='2' color='#FFFFFF'><i><b> TEXT1 </b></i></font><br/>"
MsgBody + "<font size='2' color='#000000'><i><b> NAME2: </b></i></font>"
MsgBody + "<font size='2' color='#FFFFFF'><i><b> TEXT2 </b></i></font><br/>"
MsgBody + "<font size='2' color='#000000'><i><b> NAME3: </b></i></font>"
MsgBody + "<font size='2' color='#FFFFFF'><i><b> TEXT3 </b></i></font><br/></div>"
; """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
; Text ...
MsgBody + "<font size='2' color='#000000'><i><b>" + "owiefwehuiuyuiyiuuiyiuHGUIUHIUIHUIHГШНРПГШЕКВАНЩОШОШЩОшщущгксвыьдацзщ89е7у90-ш4сждычсагшЭ." + "</b></i></font>"
MsgBody + "<br/>"
MySMTPServer.s = "mail.rambler.ru"
MySMTPPort.l = 587
MailTo.s = "pure-test@rambler.ru"
MailFrom.s = "pure-test@rambler.ru"
Subject.s = "Test (with attachments)"
Username.s = MailFrom
Password.s = "test1234"
Attachment$ = ""; "d:\1.jpg"
If PureSMTP_OpenSMTPConnection(MySMTPServer, MySMTPPort) = #PureSMTP_Ok
PureSMTP_SetXMailer("Testemail")
;PureSMTP_SetContentType("multipart/alternative; charset=UTF-8")
PureSMTP_SetContentType("text/html; charset=windows-1251")
PureSMTP_AddHeader("X-MSMail-Priority", "Normal")
Head$ = "<head><meta http-equiv="+Chr(34)+"Content-Type"+Chr(34)+" content="+Chr(34)+"text/html; charset=windows-1251"+Chr(34)+"></head><body>"
Footer$ = "</div></body></html>"
Message$ + Head$ + MsgBody + Footer$
Status = PureSMTP_SendMail(MailTo, MailFrom, Subject, Message$, Attachment$, Username, Password, "Content-Type: text/html; charset=windows-1251")
If Status = #PureSMTP_Ok
Title$ = "Success"
Msg$ = PureSMTP_GetLastServerMessage()
MessageRequester(Title$, Msg$, #PB_MessageRequester_Ok | #MB_ICONINFORMATION)
Else
Title$ = "Error"
Msg$ = "Sendmail error code: " +Str(Status) + Chr(10) + PureSMTP_GetLastServerMessage()
MessageRequester(Title$, Msg$, #PB_MessageRequester_Ok | #MB_ICONERROR)
EndIf
Else
Title$ = "Error"
Msg$ = "OpenSMTP error: " + Chr(10) + PureSMTP_GetLastServerMessage()
MessageRequester(Title$, Msg$, #PB_MessageRequester_Ok | #MB_ICONERROR)
EndIf
.... the body text is in cyrillic (1251).
Thankyou.