[twsocket] Send an html mail
I want to send an html page saved by the TWebBrowser with the THtmlSMTPCli (ICS) After this line of code: HtmlSMTPCli1.HtmlText.LoadFromFile(MailMessageFile);. when I inspect the content of the HtmlText property, there is a lot of strange characteres, and if I send the email comes an blank message I discovered that the page saved by the WebBrowser is encoded with an charset, wich is not supported by the HTMLText property because it is an StringList and it only accepts ansi text files, Creating an plain ansi text file in notepad and pasting the htmlcode and sending it, the message displays correctly My problem is that my cliente will create the html pages using an editor that I created using the WebBrowser, My question is: - Is there a way to send these pages with the HtmlSmtpCli component? Thanks! -- 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
Re: [twsocket] Send an html mail
After this line of code: HtmlSMTPCli1.HtmlText.LoadFromFile(MailMessageFile);. when I inspect the content of the HtmlText property, there is a lot of strange characteres, and if I send the email comes an blank message Probably the body of the HTML page just uses a different charset. If so, try to change property Charset of the component to the charset of the HTML body. If that doesn't help upload the page somewhere and post the link here. -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Adilson Garcia wrote: I want to send an html page saved by the TWebBrowser with the THtmlSMTPCli (ICS) After this line of code: HtmlSMTPCli1.HtmlText.LoadFromFile(MailMessageFile);. when I inspect the content of the HtmlText property, there is a lot of strange characteres, and if I send the email comes an blank message I discovered that the page saved by the WebBrowser is encoded with an charset, wich is not supported by the HTMLText property because it is an StringList and it only accepts ansi text files, Creating an plain ansi text file in notepad and pasting the htmlcode and sending it, the message displays correctly My problem is that my cliente will create the html pages using an editor that I created using the WebBrowser, My question is: - Is there a way to send these pages with the HtmlSmtpCli component? Thanks! -- 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
Re: [twsocket] Send an html mail
Arno Garrels wrote: If that doesn't help upload the page somewhere and post the link here. Don't upload the page but the file, of course. -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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
Re: [twsocket] Send an html mail
Arno Garrels wrote: Probably the body of the HTML page just uses a different charset. If so, try to change property Charset of the component to the charset of the HTML body. If that doesn't help upload the page somewhere and post the link here. I just found that the THtmlSmtpCli doesn't have a published property HtmlCharset, sorry. But it is very easy to fix, just add two lines like shown below, save and rebuild the ICS package. In (OverbyteIcs)SmtpProt.pas search the string property HtmlText : TStrings read FHtmlText [..] published property EmailImages : TStrings read FEmailImages write SetEmailImages; property PlainText : TStrings read FPlainText write SetPlainText; property HtmlText : TStrings read FHtmlText write SetHtmlText; add= property HtmlCharset : String read FHtmlCharset add= write FHtmlCharset; end; [..] I'm pretty sure that we will see this change in the next release. -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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
Re: [twsocket] UDP question...
I think with UDP you get can get packets in different order, not get them at all, get them repeated.. but as opposed to TCP you get entire packets, if you send 100 bytes at once, you get 100 at once. Someone correct me if I'm wrong.. Hi, This is the first time I am writing a UDP server. The other UDP was a client. It was fairly straight forward. As the server lets say I have 2 clients, A and B, that will be sending me unsolicited data of 100 bytes per message. If I understand, when TWSocket.OnDataAvailable fires the data source can be mixed. For example I could get 10 bytes from A, then 19 bytes from B, then 14 bytes from B and then 56 bytes from A, etc. And I might not get the hundred bytes. I might only get 45. This lead to keeping separate state machines for each client. With TCP I normally read the data to the client buffer and post a message so that OnDataAvailable is as short as possible. In this case it appears I need to read it to a buffer, determine the client, move the data to the clients buffer and post a message. Sound about right? Ciao, Mark -- 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 -- 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