> I am using a delphi 7 TRichedit box and using the code 
> Smtpcli.MailMessage := editor.lines where editor is the Richedit.

You need to set the PlainText property to false to read rich text into a
stream or file, don't know about use of Lines.Text, not mentioned in the
help.  Use the debugger to ensure you are actually reading RichText. 

> How do I set the Mime type for the TSmtpCli component.

Using RichText for the main email body is not a good idea, since some
email clients will be unable to interpret the RTF formatting.  It is more
common to use HTML for pretty formatted emails.  

So normally the main body is plain text, and HTML or RichText is an
attachment, see the OverbyteIcsMailSnd and OverbyteIcsMailHtml demo
projects.  You can save your richtext to a file with RTF extension, and
add the file name to the EmailFiles list, and the component should
automatically set the content type and encode it.  

Unfortunately the file extension RTF is not currently recognised by the
component, since it's virtually never used, so the source would need
updating to set text/richtext.

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to