DZ-Jay wrote: >Hello: > To attach an image and display it inline, you must reference it via >its MIME Content-ID from the image tags. For example, when you attach >the image, you create a Content-ID header for that attachment, and use >this ID to replace the image src attribute in the HTML source: > > <img src="cid:{IMAGE_CONTENT_ID}"> > > The SMTP Component does not do this automatically, but I believe that >there's a demo (MailHtml) that shows how to do this. > > dZ. > > > Thz, the sendmail is here:
well, waiting help........ Thz procedure TForm1.SendEmail; var MsgHTML, FromINI, FileAttachMemo: TStringList; x: integer; begin memo1.Clear; MsgHTML := TStringList.Create; MsgHTML.Clear; FromINI := TStringList.Create; FromINI.Clear; FileAttachMemo := TStringList.Create; FileAttachMemo.Clear; if smtpcli.Connected then begin MessageBeep(MB_OK); Exit; end; smtpcli.Host := HostEdit.Text; smtpcli.Port := 'smtp'; smtpcli.FromName := FromEdit.Text; smtpcli.HdrFrom := FromEdit.Text; smtpcli.HdrTo := 'Clients'; smtpcli.HdrCc := ''; smtpcli.HdrSubject := SubjectEdit.Text; FileAttachMemo.Add('ad_mail.jpg'); smtpcli.EmailFiles := FileAttachMemo; <--------here attach image file smtpcli.AuthType := smtpAuthLogin; smtpcli.Username := UsernameEdit.Text; smtpcli.Password := PasswordEdit.Text; smtpcli.ContentType := smtpHtml; FromINI.LoadFromFile('emailcuerpo1.ini'); for x:=0 to FromINI.Count - 1 do begin MsgHTML.Add(StringReplace(FromINI.Strings[x], '%%MENSAJE%%', 'hola', [rfReplaceAll])); end; smtpcli.HtmlText := MsgHTML; MsgHTML.Free; FromINI.Free; FileAttachMemo.Free; smtpcli.RcptName.Clear; smtpcli.RcptNameAdd('[EMAIL PROTECTED]', '', ''); memo1.Lines.Add('Connecting smtp server ...'); smtpcli.Connect; end; -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be