Re: [twsocket] TSmtpCli in library: how to process events?
Ronald Wilmink wrote: I have used the TSmtpCli component in applications without any problems. But now, I need to use it in a service that calls a function in a dll that has no Form, just units. That function needs to send emails. Since the component works with events that are not available in the dll, mailing does not work. Using ICS in a DLL is similar to using it in a console application. Take a look at the OverbyteIcsConSmtp demo for an SMTP example or at the OverbyteIcsDll samples. -- Arno -- 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] TSmtpCli Questions
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
Re: [twsocket] TSmtpCli Questions
1. I have a richedit box hat I have formatted text in Smtpcli.MailMessage := editor.lines; I have noticed that none of the formatting is carried across to the sent email How are you extracting the text from the richedit control, with which method? To maintain RTF formatting, you also need to set the MIME content type to text/richtext and encode it. 2. Is there a way to set a delivery report, in the email hearder, if so how? Delivery reports depend on the client recognising the special header and returning an email, many clients deliberately do not. Just set ConfirmReceipt to true, and the Disposition-Notification-To: header will be added with your from address. 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
Re: [twsocket] TsmtpCli with SSL
Dimos Vlachavas wrote: Does the TSmtpCli support ports other than 25? No, only TSslSmtpCli supports SSL/TLS. Including SSL/TLS connections or method/command STARTTLS on any port number you want. -- Arno Garrels -- 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] TsmtpCli with SSL
Does the TSmtpCli support ports other than 25? No, only TSslSmtpCli supports SSL/TLS. Including SSL/TLS connections or method/command STARTTLS on any port number you want. Just to clarify Arno's answer: If you need to send Emails with SMTP over SSL/TLS link, you need the SSL enabled version of the well known TSmtpCli component. This component is names TSslSmtpCli. The usage is almost the same as TSmtpCli with of course added properties, methods and events to handle SSL/TLS operation. TSslSmtpCli is included in the standard ICS distribution of ICS. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) 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
Re: [twsocket] TSmtpCli and bad spam score
Le 03/09/2010 23:03, DZ-Jay a écrit : Fabrice, I do not have Delphi available at this moment, so could you test the code below to see if it is treated as spam by SpamAssassin? Hello, There is a tools to check SpamAssassin score here : http://www.mailingcheck.com/ Best regards, -- Fabrice Vendé techni...@infocob.com mailto:techni...@infocob.com http://www.infocob.com/ SARL Infocob http://www.infocob.com/ 154 avenue de Talmont BP20076 85102 Les Sables d'Olonne Cedex -- 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] TSmtpCli and bad spam score
Le 03/09/2010 23:03, DZ-Jay a écrit : Fabrice, I do not have Delphi available at this moment, so could you test the code below to see if it is treated as spam by SpamAssassin? Hello, There is a tools to check SpamAssassin score here : http://www.mailingcheck.com/ Best regards, - Fabrice -- 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] TSmtpCli and bad spam score
Fabrice, I do not have Delphi available at this moment, so could you test the code below to see if it is treated as spam by SpamAssassin? Checking against SpamAssassin is required, but checking against most common mail readers (either standalone mail client or webmail applications) is also mandatory. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be - Original Message - From: DZ-Jay d...@caribe.net To: ICS support mailing twsocket@elists.org Sent: Friday, September 03, 2010 11:03 PM Subject: Re: [twsocket] TSmtpCli and bad spam score On 09/03/2010 15:09, Arno Garrels wrote: Does that mean that you or DZ-Jay will check in this change? I'm currently not up to date with the SMTP RFCs. But I wonder why Priority and X-MSMail-Priority are no longer required? Arno, I did a little more research (I haven't kept up with these RFCs for a while) and I found the following: The Priority header is defined in RFC #2156 (MIXER) for MIME headers, which extends RFC #822. However, it appears that nobody is using that header. There was a time, as you may know, that most every mail client implemented their own set of standards for things like Priority and Return Receipt, and they were all different. Nowadays, these have standardize a bit, but they are still conventions, not standards. This is the reason why ICS and other libraries and applications typically include more than one variation of a header, to please the most popular clients out there and their idiosyncrasies. The X-MSMail-Priority header was introduced in old versions of MS Outlook Express client, but it has been superseded by X-Priority since then. It was always MS-specific and non-standard. X-Priority was originally introduced by Eudora in the 1980s, but since it was so popular, many other clients followed suit. (The X- prefix indicates that it is a custom field.) RFC #2156 seems to try to formalize this with Priority as a bona fide header, but perhaps it came too late and nobody paid attention. I guess we should include it too, for the sake of following standards. After all, it is the only one of those which appears on an actual RFC. And if SpamAssassin treats it as spam, well then it is SpamAssassin who is wrong. Fabrice, I do not have Delphi available at this moment, so could you test the code below to see if it is treated as spam by SpamAssassin? procedure TCustomSmtpClient.Data; ... if FHdrPriority smtpPriorityNormal then begin FHdrLines.Add('Importance: high'); FHdrLines.Add('Priority: urgent'); FHdrLines.Add('X-Priority: 1'); end { else if FHdrPriority = smtpPriorityNormal then begin FHdrLines.Add('Importance: normal'); FHdrLines.Add('Priority: normal'); FHdrLines.Add('X-Priority: 3'); end } else begin FHdrLines.Add('Importance: low'); FHdrLines.Add('Priority: non-urgent'); FHdrLines.Add('X-Priority: 5'); end; ... Thanks, -dZ. -- 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
Re: [twsocket] TSmtpCli and bad spam score
Hello DZ-Jay, At least Firebird provides 5 priorities so why should we remove this feature from ICS? It's likely that X-MSMail-Priority can be removed, however my OE v6 still uses it, XP SP3. Isn't it just the high priority itself, that scores? -- Arno Garrels On 09/03/2010 15:09, Arno Garrels wrote: Does that mean that you or DZ-Jay will check in this change? I'm currently not up to date with the SMTP RFCs. But I wonder why Priority and X-MSMail-Priority are no longer required? Arno, I did a little more research (I haven't kept up with these RFCs for a while) and I found the following: The Priority header is defined in RFC #2156 (MIXER) for MIME headers, which extends RFC #822. However, it appears that nobody is using that header. There was a time, as you may know, that most every mail client implemented their own set of standards for things like Priority and Return Receipt, and they were all different. Nowadays, these have standardize a bit, but they are still conventions, not standards. This is the reason why ICS and other libraries and applications typically include more than one variation of a header, to please the most popular clients out there and their idiosyncrasies. The X-MSMail-Priority header was introduced in old versions of MS Outlook Express client, but it has been superseded by X-Priority since then. It was always MS-specific and non-standard. X-Priority was originally introduced by Eudora in the 1980s, but since it was so popular, many other clients followed suit. (The X- prefix indicates that it is a custom field.) RFC #2156 seems to try to formalize this with Priority as a bona fide header, but perhaps it came too late and nobody paid attention. I guess we should include it too, for the sake of following standards. After all, it is the only one of those which appears on an actual RFC. And if SpamAssassin treats it as spam, well then it is SpamAssassin who is wrong. Fabrice, I do not have Delphi available at this moment, so could you test the code below to see if it is treated as spam by SpamAssassin? procedure TCustomSmtpClient.Data; ... if FHdrPriority smtpPriorityNormal then begin FHdrLines.Add('Importance: high'); FHdrLines.Add('Priority: urgent'); FHdrLines.Add('X-Priority: 1'); end { else if FHdrPriority = smtpPriorityNormal then begin FHdrLines.Add('Importance: normal'); FHdrLines.Add('Priority: normal'); FHdrLines.Add('X-Priority: 3'); end } else begin FHdrLines.Add('Importance: low'); FHdrLines.Add('Priority: non-urgent'); FHdrLines.Add('X-Priority: 5'); end; ... Thanks, -dZ. -- 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] TSmtpCli and bad spam score
Arno Garrels wrote: Isn't it just the high priority itself, that scores? Or most likely the existence of the word Priority, may it be low or high? But I cannot remember when I saw the last spam mail with a high priority. -- Arno Garrels -- 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] TSmtpCli and bad spam score
On Sep 04, 2010, at 11:40, Arno Garrels wrote: Hello DZ-Jay, At least Firebird provides 5 priorities so why should we remove this feature from ICS? It's not standard, most clients assume there's only low, normal, and urgent. In any case, setting TSmtpCli to use only three values (which is what it currently does, by the way) does not prevent other clients from using 5 values. Those clients will likely map low to 1 and high to 5. It's likely that X-MSMail-Priority can be removed, however my OE v6 still uses it, XP SP3. But that's OE v6. The question is, do we want ICS to impersonate OE v6, or to implement the protocol and let the client extend it as it wishes? I don't have Windows at hand right now, could you test if OE v6 handles X-Priority or Priority too? Remember, one thing is the header it sends, another is the headers it understands from incoming mail. Typically, mail client developers understand that they receive messages from many different clients. RFC #2156 defines only 3 levels for the Priority header: normal, urgent, and non-urgent. X-Priority on the other hand is typically treated as a numeric value (0 through 5), where zero (or no header) means normal and the rest is a range between very low and urgent. This was the way it was defined in the old Eudora client. Like I mentioned, it's a mess of standards. What most programs do is to use what they think is the most common (e.g., X-Priority) and then attempt to detect all other common possibilities. I think ICS should do the same, pick one from the most common ones and send that one only. Client applications using TPop3Cli component should then take care to expect different formats and attempt to decode them. It should not hurt to include more than one, but it may be unnecessary, and it also doesn't follow the convention of other popular clients. The RFC standard suggests Priority, but like I said, not many clients seem to be using it. They probably support it, though. The most common one seems to be X-Priority. I'm not an expert on this, so please do not think I'm proposing definitive solutions. These are mere personal suggestions based on my observations. Your views are welcome. Isn't it just the high priority itself, that scores? I did a bit more research on why SpamAssassin and why it would treat the priority headers as spam and found the following default rules: X_PRIORITY_HIGH: 2.0—Sent with 'X-Priority' set to high MISSING_MIMEOLE: 0.5—Message has X-MSMail-Priority, but no X-MimeOLE PRIORITY_NO_NAME: 0.5—Message has priority setting, but no X-Mailer It seems obvious what the problem was with the original ICS code: a very high spam score was given because X-Priority was set to high instead of to a numeric value, suggesting that it was a spamming tool and not one of the many real clients that use the Eudora header. Also, X-MSMail-Priority is expected to come with X-MimeOLE which identify the client as MS Outlook. And lastly, any priority header detected without an X-Mailer header suggests that it doesn't come from a real mailer. Also, keep in mind that modern clients use a single header for priority (whichever they pick), so including many may also alert other spam detectors. dZ. -- 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] TSmtpCli and bad spam score
DZ-Jay wrote: On Sep 04, 2010, at 11:40, Arno Garrels wrote: Hello DZ-Jay, At least Firebird provides 5 priorities so why should we remove this feature from ICS? It's not standard, most clients assume there's only low, normal, and urgent. In any case, setting TSmtpCli to use only three values (which is what it currently does, by the way) It actually uses 5 values, look at the source: if FHdrPriority smtpPriorityNone then begin FHdrLines.Add('X-Priority: ' + IntToStr(Ord(FHdrPriority))); if FHdrPriority smtpPriorityNormal then begin FHdrLines.Add('Priority: urgent'); FHdrLines.Add('X-MSMail-Priority: High'); end else if FHdrPriority = smtpPriorityNormal then begin FHdrLines.Add('Priority: Normal'); FHdrLines.Add('X-MSMail-Priority: Normal'); end else begin FHdrLines.Add('Priority: non-urgent'); FHdrLines.Add('X-MSMail-Priority: Low'); end; end; It's likely that X-MSMail-Priority can be removed, however my OE v6 still uses it, XP SP3. But that's OE v6. The question is, do we want ICS to impersonate OE v6, or to implement the protocol and let the client extend it as it wishes? No, I do not think so. I don't have Windows at hand right now, could you test if OE v6 handles X-Priority or Priority too? It understands X-Priority not Priority. Remember, one thing is the header it sends, another is the headers it understands from incoming mail. Typically, mail client developers understand that they receive messages from many different clients. I understand that since along time. I think ICS should do the same, pick one from the most common ones and send that one only. Most likely, but it has to be tested with all common e-mail readers in use today. I currently haven't the time to do that. Client applications using TPop3Cli component should then take care to expect different formats and attempt to decode them. It should not hurt to include more than one, but it may be unnecessary, and it also doesn't follow the convention of other popular clients. The RFC standard suggests Priority, but like I said, not many clients seem to be using it. They probably support it, though. The most common one seems to be X-Priority. That's my guess as well, but before we change the source it must be fact. -- Arno Garrels -- 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] TSmtpCli and bad spam score
On Sep 04, 2010, at 13:14, Arno Garrels wrote: DZ-Jay wrote: On Sep 04, 2010, at 11:40, Arno Garrels wrote: Hello DZ-Jay, At least Firebird provides 5 priorities so why should we remove this feature from ICS? It's not standard, most clients assume there's only low, normal, and urgent. In any case, setting TSmtpCli to use only three values (which is what it currently does, by the way) It actually uses 5 values, look at the source: Sorry, I was going by the code posted by Fabrice at the start of this thread. I didn't see the X-Priority in that code. We should definitely keep that. It understands X-Priority not Priority. Good, then keeping X-Priority should work fine for it. My guess is that nobody else uses exclusively the OE header, since it's MS-specific and non-standard. Most likely, but it has to be tested with all common e-mail readers in use today. I currently haven't the time to do that. I agree. I also do not have the time, nor access to all common clients, to do extensive testing. Client applications using TPop3Cli component should then take care to expect different formats and attempt to decode them. It should not hurt to include more than one, but it may be unnecessary, and it also doesn't follow the convention of other popular clients. The RFC standard suggests Priority, but like I said, not many clients seem to be using it. They probably support it, though. The most common one seems to be X-Priority. That's my guess as well, but before we change the source it must be fact. I agree, though fact is a little too ambitious; after all these are conventions not hard-enforced standards. The best we can hope for is to follow the most common conventions. Based on the code you posted the only suggestions I have, is to remove the X-MSMail-Priority header which is OE-specific and seems to be treated as spam by SpamAssassin. After this header then we can tackle the return receipt feature which is just as messy and controversial :) dZ. -- 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] TSmtpCli and bad spam score
On Sep 03, 2010, at 06:53, Fabrice Vendé wrote: if FHdrPriority smtpPriorityNormal then begin FHdrLines.Add('Priority: urgent'); FHdrLines.Add('X-MSMail-Priority: High'); end else if FHdrPriority = smtpPriorityNormal then begin FHdrLines.Add('Priority: Normal'); FHdrLines.Add('X-MSMail-Priority: Normal'); end else begin FHdrLines.Add('Priority: non-urgent'); FHdrLines.Add('X-MSMail-Priority: Low'); end; In scanning messages sent from MS Outlook through an MS Exchange Server, I noticed that it set the following headers: ... Importance: high X-Priority: 1 ... This suggests that those two headers are deprecated. SpamAssassin (as well as other anti-spam engines) tend to look for these obsolete headers as markers of e-mail sent by a spamming tool. The rationalization is that users tend to upgrade eventually to the latest versions of applications, while spamming tools, being created ad hoc and seldom maintained consistently, do not react as quickly to changes. Thus it is reasonable to assume that if a spam tool is designed to mimic Outlook at some time, whenever those headers are changed by Microsoft, only the tool will continue using them. I suggest a better solution would be as follows, which more closes adheres to conventions. These values have been empirically discovered testing with Apple Mail, MS Outlook, and Mozilla Thunderbird. They are also described in various suggested standards. Notice that Normal Priority is typically marked by the absence of any priority marker. procedure TCustomSmtpClient.Data; ... if FHdrPriority smtpPriorityNormal then begin FHdrLines.Add('Importance: high'); FHdrLines.Add('X-Priority: 1'); end { else if FHdrPriority = smtpPriorityNormal then begin FHdrLines.Add('Importance: normal'); FHdrLines.Add('X-Priority: 3'); end } else begin FHdrLines.Add('Importance: low'); FHdrLines.Add('X-Priority: 5'); end; ... dZ. -- DZ-Jay [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] TSmtpCli and bad spam score
I suggest a better solution would be as follows, which more closes adheres to conventions. These values have been empirically discovered testing with Apple Mail, MS Outlook, and Mozilla Thunderbird. They are also described in various suggested standards. Notice that Normal Priority is typically marked by the absence of any priority marker. procedure TCustomSmtpClient.Data; ... if FHdrPriority smtpPriorityNormal then begin FHdrLines.Add('Importance: high'); FHdrLines.Add('X-Priority: 1'); end { else if FHdrPriority = smtpPriorityNormal then begin FHdrLines.Add('Importance: normal'); FHdrLines.Add('X-Priority: 3'); end } else begin FHdrLines.Add('Importance: low'); FHdrLines.Add('X-Priority: 5'); end; ... Look good. -- francois.pie...@overbyte.be 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
Re: [twsocket] TSmtpCli and bad spam score
Francois PIETTE wrote: I suggest a better solution would be as follows, which more closes adheres to conventions. These values have been empirically discovered testing with Apple Mail, MS Outlook, and Mozilla Thunderbird. They are also described in various suggested standards. Notice that Normal Priority is typically marked by the absence of any priority marker. procedure TCustomSmtpClient.Data; ... if FHdrPriority smtpPriorityNormal then begin FHdrLines.Add('Importance: high'); FHdrLines.Add('X-Priority: 1'); end { else if FHdrPriority = smtpPriorityNormal then begin FHdrLines.Add('Importance: normal'); FHdrLines.Add('X-Priority: 3'); end } else begin FHdrLines.Add('Importance: low'); FHdrLines.Add('X-Priority: 5'); end; ... Look good. Does that mean that you or DZ-Jay will check in this change? I'm currently not up to date with the SMTP RFCs. But I wonder why Priority and X-MSMail-Priority are no longer required? -- Arno Garrels -- 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] TSmtpCli and bad spam score
On 09/03/2010 15:09, Arno Garrels wrote: Does that mean that you or DZ-Jay will check in this change? I'm currently not up to date with the SMTP RFCs. But I wonder why Priority and X-MSMail-Priority are no longer required? Arno, I did a little more research (I haven't kept up with these RFCs for a while) and I found the following: The Priority header is defined in RFC #2156 (MIXER) for MIME headers, which extends RFC #822. However, it appears that nobody is using that header. There was a time, as you may know, that most every mail client implemented their own set of standards for things like Priority and Return Receipt, and they were all different. Nowadays, these have standardize a bit, but they are still conventions, not standards. This is the reason why ICS and other libraries and applications typically include more than one variation of a header, to please the most popular clients out there and their idiosyncrasies. The X-MSMail-Priority header was introduced in old versions of MS Outlook Express client, but it has been superseded by X-Priority since then. It was always MS-specific and non-standard. X-Priority was originally introduced by Eudora in the 1980s, but since it was so popular, many other clients followed suit. (The X- prefix indicates that it is a custom field.) RFC #2156 seems to try to formalize this with Priority as a bona fide header, but perhaps it came too late and nobody paid attention. I guess we should include it too, for the sake of following standards. After all, it is the only one of those which appears on an actual RFC. And if SpamAssassin treats it as spam, well then it is SpamAssassin who is wrong. Fabrice, I do not have Delphi available at this moment, so could you test the code below to see if it is treated as spam by SpamAssassin? procedure TCustomSmtpClient.Data; ... if FHdrPriority smtpPriorityNormal then begin FHdrLines.Add('Importance: high'); FHdrLines.Add('Priority: urgent'); FHdrLines.Add('X-Priority: 1'); end { else if FHdrPriority = smtpPriorityNormal then begin FHdrLines.Add('Importance: normal'); FHdrLines.Add('Priority: normal'); FHdrLines.Add('X-Priority: 3'); end } else begin FHdrLines.Add('Importance: low'); FHdrLines.Add('Priority: non-urgent'); FHdrLines.Add('X-Priority: 5'); end; ... Thanks, -dZ. -- 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] TSmtpCli test いいろ はにほへど ちりぬるを我が世誰 ぞ 常ならむ我が世誰誰ぞ 常ならむ我が世世誰ぞ 常 ならむ我が世誰ぞ 常なら む我が世誰ぞ 常ならむむ
Hello Piotr, Header lines seem to be malformed, however... I changed the quoted-printable encoding to encode some more chars, do you see any change on your side? This poetry contains all the sounds in the Japanese language and used to be the first thing for children to learn in their Japanese class. The Hiragana version is particularly neat because it covers every character in the phonetic Hiragana character set. Japanese (Hiragana): いろはにほへど ちりぬるを わがよたれぞ つねならむ うゐのおくやま けふこえて あさきゆめみじ ゑひもせず Kanji version: 色は匂へど 散りぬるを 我が世誰ぞ 常ならむ 有為の奥山 今日越えて 浅き夢見じ 酔ひもせず -- Arno Garrels Test Test-- 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] TSmtpCli test..
Hello Piotr, Header lines seem to be malformed, however... I changed the quoted-printable encoding to encode some more chars, do you see any change on your side? I do not know what you guys got back from my previous test, this time I got a subject header properly reencoded to Base64. The original mail was encoded quoted-printable. So obviously these tests make no sense. Anyway, thank you all. -- Arno Garrels -- 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] TSmtpCli Error 451
Hello Max, With a program sending multiple emails, one user is getting this: MAIL FROM:x...@btconnect.com 250 x...@btconnect.com... Sender ok RCPT TO:a...@msn.com 451 Too many messages Send failed RequestDone Rq=9 Error=451 Disconnect failed RequestDone Rq=6 Error=451 First, am I right in assuming this is a mail server issue? Correct. Or could there be something I can do with ICS other than just failing gracefully? The number of emails involved is actually quite modest (here the process failed after 25 emails had been sent). Are those messages just carbon copies or blind carbon copies? If so, you could try to issue Data when you get the 451 error, and send the next 25 after command Reset if the server does not drop the connection of course. Second, how can I avoid the Disconnect failed error as well? Where does it come from? Does the server disconnect the line? -- Arno Garrels -- 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] TSmtpCli Error 451
- Original Message - From: Arno Garrels arno.garr...@gmx.de To: ICS support mailing twsocket@elists.org Sent: Wednesday, October 28, 2009 4:02 PM Subject: Re: [twsocket] TSmtpCli Error 451 Hello Max, With a program sending multiple emails, one user is getting this: MAIL FROM:x...@btconnect.com 250 x...@btconnect.com... Sender ok RCPT TO:a...@msn.com 451 Too many messages Send failed RequestDone Rq=9 Error=451 Disconnect failed RequestDone Rq=6 Error=451 First, am I right in assuming this is a mail server issue? Correct. Or could there be something I can do with ICS other than just failing gracefully? The number of emails involved is actually quite modest (here the process failed after 25 emails had been sent). Are those messages just carbon copies or blind carbon copies? If so, you could try to issue Data when you get the 451 error, and send the next 25 after command Reset if the server does not drop the connection of course. Second, how can I avoid the Disconnect failed error as well? Where does it come from? Does the server disconnect the line? -- Arno Garrels -- 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 There are hosts who limit the amount of mails send per hour. If this is the case then splitting the bulk will not work as this will not influence the amount of emails sent per hour. I had an issue with that with my provider while mailing a newsletter. After I reached 100 I could not send any mail that hour, not even my private mail. So it's a mail server issue, but also a provider issue. albert -- 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] TSmtpCli Error 451
Arno - With a program sending multiple emails, one user is getting this: MAIL FROM:x...@btconnect.com 250 x...@btconnect.com... Sender ok RCPT TO:a...@msn.com 451 Too many messages Send failed RequestDone Rq=9 Error=451 Disconnect failed RequestDone Rq=6 Error=451 Are those messages just carbon copies or blind carbon copies? If so, you could try to issue Data when you get the 451 error, and send the next 25 after command Reset if the server does not drop the connection of course. No, the emails aren't carbon copies, though the text might be identical. Second, how can I avoid the Disconnect failed error as well? Where does it come from? Does the server disconnect the line? I am issuing a Quit() myself when the Mail() command fails. The log output above is generated in the SmtpClientRequestDone event switch (LastRequest) { case 8: s = (Error == 0) ? Connected : Connect failed; break; case 9: s = (Error == 0) ? Mail sent : Send failed; break; case 6: s = (Error == 0) ? Disconnected : Disconnect failed; break; } Albert - There are hosts who limit the amount of mails send per hour. If this is the case then splitting the bulk will not work as this will not influence the amount of emails sent per hour. I had an issue with that with my provider while mailing a newsletter. After I reached 100 I could not send any mail that hour, not even my private mail. So it's a mail server issue, but also a provider issue. Yes, it sounds as though I need to ask the user to talk to their service provider. But 25 emails seems unbelievably stingy. - Max -- 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] TSmtpCli autenication
Mixed up request types with methods, guess you know what I mean nevertheless. That's ok. Thanks for the help. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- 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] TSmtpCli autenication
Hello Wilfried, I cannot test this at the moment, but if I set in TSmtpCli (ICS V5): AutType := smtpAuthAutoSelect; And fill in the userName and passWord (at creation time), is this enough that it find all possible autentication types (seems to be quit a few)? It's enough. It even probes for types not announced in the EHLO response. It failed if no authentication was required. -- Arno Garrels -- 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] TSmtpCli autenication
thank you Arno for fast answer, Does it not matter how the code is written (OnRequestDone), eg like this: case RqType of smtpConnect: begin Cli.Helo; end; smtpHelo: begin Cli.Mail; end; Meaning, I don't use Ehlo method or so. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Wednesday, August 5, 2009, 17:31, Arno Garrels wrote: Hello Wilfried, I cannot test this at the moment, but if I set in TSmtpCli (ICS V5): AutType := smtpAuthAutoSelect; And fill in the userName and passWord (at creation time), is this enough that it find all possible autentication types (seems to be quit a few)? It's enough. It even probes for types not announced in the EHLO response. It failed if no authentication was required. -- Arno Garrels -- 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
Re: [twsocket] TSmtpCli autenication
Wilfried Mestdagh wrote: Does it not matter how the code is written (OnRequestDone), eg like this: case RqType of smtpConnect: begin Cli.Helo; end; smtpHelo: begin Cli.Mail; end; Meaning, I don't use Ehlo method or so. EHLO is required for authentication, otherwise an exception was raised. As long as HELO is supported by mail servers you could call smtpHelo if no authentication is wanted and smtpEhlo otherwise. Something like this: case RqType of smtpConnect: begin if SmtpClient.AuthType = smtpAuthNone then SmtpClient.Helo else SmtpClient.Ehlo; end; smtpHelo: SmtpClient.MailFrom; smtpEhlo: SmtpClient.Auth; [..] -- Arno Garrels -- 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] TSmtpCli autenication
Arno Garrels wrote: Wilfried Mestdagh wrote: Does it not matter how the code is written (OnRequestDone), eg like this: case RqType of smtpConnect: begin Cli.Helo; end; smtpHelo: begin Cli.Mail; end; Meaning, I don't use Ehlo method or so. EHLO is required for authentication, otherwise an exception was raised. As long as HELO is supported by mail servers you could call smtpHelo if no authentication is wanted and smtpEhlo otherwise. Something like this: Mixed up request types with methods, guess you know what I mean nevertheless. -- Arno Garrels -- 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] TSmtpCli + TLS + SSL Support
Thank's for your support, after this everythink is ok, I sent mails using my gmail account with Implicit(port 465) and Explicit(port 25). Thank you for your support. On Tue, Jan 6, 2009 at 3:43 PM, Arno Garrels arno.garr...@gmx.de wrote: luciano digivoice wrote: I was reading the source code of 'OverbyteIcsSslMailSnd', but I don't know the steps that I need to follow to send an e-mail using my gmail account, There is nothing special with gmail accounts. Gmail provides both, Implicit and Explicit TLS. Implicit requires to connect to a dedicated port number, Explicit (STARTTLS) starts the session as plain text on port 25 and after the StartTls command succeeded the connection continues encrypted. What I need to type in the 'text box' parameters, and I don't know the button steps that I need to follow. For Explicit TLS on port 25: Connect - Ehlo - StartTls - Ehlo - Auth - MailFrom - RcptTo - Data - Quit If you do not tick the SslVerifyPeer checkbox neither CA File nor CA Path are required, Cert File, Key File and Passphrase are not required with gmail. -- 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 -- Luciano Alves Barroso Equipe de Desenvolvimento DigiVoice Channel Driver DigiVoice Meucci www.digivoice.com.br www.meucci.org -- 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] TSmtpCli + TLS + SSL Support
Hi, first of all thank you so much. I was reading the source code of 'OverbyteIcsSslMailSnd', but I don't know the steps that I need to follow to send an e-mail using my gmail account, What I need to type in the 'text box' parameters, and I don't know the button steps that I need to follow. Could you help me? Thanks. On Mon, Jan 5, 2009 at 4:44 PM, Arno Garrels arno.garr...@gmx.de wrote: luciano digivoice wrote: Hello All, after set USE_SSL at .inc file everything is OK, I tried to send an email using tls support and OK. I have my GMail accont and I would like to know if anyone has an example of a source code to help me. There's a demo application in sub folder SslInternet. What do I need to set on the TSslSmtpCli parameters? Which ones are unclear or what do you want to achieve? -- 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 -- Luciano Alves Barroso Equipe de Desenvolvimento DigiVoice Channel Driver DigiVoice Meucci www.digivoice.com.br www.meucci.org -- 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] TSmtpCli + TLS + SSL Support
luciano digivoice wrote: I was reading the source code of 'OverbyteIcsSslMailSnd', but I don't know the steps that I need to follow to send an e-mail using my gmail account, There is nothing special with gmail accounts. Gmail provides both, Implicit and Explicit TLS. Implicit requires to connect to a dedicated port number, Explicit (STARTTLS) starts the session as plain text on port 25 and after the StartTls command succeeded the connection continues encrypted. What I need to type in the 'text box' parameters, and I don't know the button steps that I need to follow. For Explicit TLS on port 25: Connect - Ehlo - StartTls - Ehlo - Auth - MailFrom - RcptTo - Data - Quit If you do not tick the SslVerifyPeer checkbox neither CA File nor CA Path are required, Cert File, Key File and Passphrase are not required with gmail. -- 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] TSmtpCli + TLS + SSL Support
Hello All, after set USE_SSL at .inc file everything is OK, I tried to send an email using tls support and OK. I have my GMail accont and I would like to know if anyone has an example of a source code to help me. What do I need to set on the TSslSmtpCli parameters? Thank you for your support. On Tue, Dec 9, 2008 at 12:05 PM, Arno Garrels arno.garr...@gmx.de wrote: luciano digivoice wrote: Good morning List, I've been using the ICS version(since 2002), I use this components only for send e-mails(TSmtpCli). Last week I got a problem using a GMAIL account, the GMAIL needs a SSL Support, and now my e-mail server needs a TLS support. How can I fix it. Is there a new version of ICS component that supports SSL and TLS. Yes, TSslSmtpCli. It is strongly suggested to upgrade to ICS V6 or V7 if you use Delphi 7 or better and to use the SVN repository since the zip download is most likely out of date. More details at http://www.overbyte.be -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html My best regards. -- Luciano Alves Barroso Equipe de Desenvolvimento DigiVoice Channel Driver DigiVoice Meucci www.digivoice.com.br www.meucci.org -- 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 -- Luciano Alves Barroso Equipe de Desenvolvimento DigiVoice Channel Driver DigiVoice Meucci www.digivoice.com.br www.meucci.org -- 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] TSmtpCli + TLS + SSL Support
luciano digivoice wrote: Hello All, after set USE_SSL at .inc file everything is OK, I tried to send an email using tls support and OK. I have my GMail accont and I would like to know if anyone has an example of a source code to help me. There's a demo application in sub folder SslInternet. What do I need to set on the TSslSmtpCli parameters? Which ones are unclear or what do you want to achieve? -- 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] TSmtpCli + TLS + SSL Support
luciano digivoice wrote: Good morning List, I've been using the ICS version(since 2002), I use this components only for send e-mails(TSmtpCli). Last week I got a problem using a GMAIL account, the GMAIL needs a SSL Support, and now my e-mail server needs a TLS support. How can I fix it. Is there a new version of ICS component that supports SSL and TLS. Yes, TSslSmtpCli. It is strongly suggested to upgrade to ICS V6 or V7 if you use Delphi 7 or better and to use the SVN repository since the zip download is most likely out of date. More details at http://www.overbyte.be -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html My best regards. -- Luciano Alves Barroso Equipe de Desenvolvimento DigiVoice Channel Driver DigiVoice Meucci www.digivoice.com.br www.meucci.org -- 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] TSmtpCli - How do I process multiple emailsusingthiscomponent?
Thanks for your reply. I have looked at the article and am guessing the best place to loop thru a database to send out mass e-mail would be in the OnRequestDone event. Would that be correct? Yes, it is. Does anyone have any code they can share of this event to show how they processed records in a database? Have a look at ICS-V5 MailRob demo program. It is very old and quite unknown but contains useful code for you. -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be - Original Message - From: Francois PIETTE [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, July 28, 2008 11:08 AM Subject: Re: [twsocket] TSmtpCli - How do I process multiple emails usingthiscomponent? You are trying to use an asynchronous (non-blocking) component as a synchronous (blocking) one. The solution is simple: think asynchronous, think events ! Have a look there: http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm Then come back here to ask for more questions... -- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) 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 -- 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] TSmtpCli - How do I process multiple emails usingthiscomponent?
Well something like this exists in my code. Some functions are my own but I think you get the picture. procedure TLCInheritSMTPDM.SmtpRequestDone(Sender: TObject; RqType: TSmtpRequest; ErrorCode: Word); begin if (error 0) then begin logMsg('Service Error occured RqType:'+inttostr(integer(RqType))+' Error:'+vartostr(error)); Exit; end; if RqType = smtpConnect then begin logMsg('Recived: smtpConnect, Sending HELO'); Smtp.Helo end else if RqType = smtpOpen then begin logMsg('Recived: smtOpen, sending MailFrom'); Smtp.MailFrom; end else if RqType = smtpHelo then begin logMsg('Recived: smtpHelo, Sending from'); Smtp.MailFrom; end else if RqType = smtpMailFrom then begin logMsg('Recived: smtpMailFrom, Sending to'); Smtp.RcptTo; end else if RqType = smtpRcptTo then begin logMsg('Recived: smtpRcptTo, Sending data'); Smtp.Data; end else if RqType = smtpData then begin logMsg('Recived: smtpData, Data sent'); //Are there any e-mail to send? if hasMail2send then begin logMsg('Sending next email'); //generate email to send here, set all values et.c. Smtp.MailFrom; end else begin logMsg('No more email to send, quitting.'); Smtp.Quit end end else if RqType = smtpQuit then begin logMsg('SMTP connection closed, restarting timer...'); SendTimer.Enabled := True; end; end; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SoftTech Sent: den 28 juli 2008 22:37 To: ICS support mailing Subject: Re: [twsocket] TSmtpCli - How do I process multiple emails usingthiscomponent? Greetings Francois, Thanks for your reply. I have looked at the article and am guessing the best place to loop thru a database to send out mass e-mail would be in the OnRequestDone event. Would that be correct? Does anyone have any code they can share of this event to show how they processed records in a database? Thanks, Mike - Original Message - From: Francois PIETTE [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, July 28, 2008 11:08 AM Subject: Re: [twsocket] TSmtpCli - How do I process multiple emails usingthiscomponent? You are trying to use an asynchronous (non-blocking) component as a synchronous (blocking) one. The solution is simple: think asynchronous, think events ! Have a look there: http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm Then come back here to ask for more questions... -- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) 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 -- 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] TSmtpCli - How do I process multipleemailsusingthiscomponent?
Hi Francois, You say that the OnRequestDone event is the correct place to process mass e-mails using the TSmtpCli component and then direct me towards the v5 ICS MailRob source. I have looked at this source and there is no OnRequestDone source, but I do see that this source uses a TSyncSmtpCli component and that SendButtonClick event source contains what looks to be a way to send multiple emails using SmtpClient.OpenSync; instead of SmtpClient.Open; So can I gather that I should be using a TSyncSmtpCli component (using the SendButtonClick event source as a guide) instead of the TSmtpCli component using some form of coding in the onRequestDone event? I await you guidance. Thanks, Mike - Original Message - From: Francois Piette [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Tuesday, July 29, 2008 2:02 AM Subject: Re: [twsocket] TSmtpCli - How do I process multipleemailsusingthiscomponent? Thanks for your reply. I have looked at the article and am guessing the best place to loop thru a database to send out mass e-mail would be in the OnRequestDone event. Would that be correct? Yes, it is. Does anyone have any code they can share of this event to show how they processed records in a database? Have a look at ICS-V5 MailRob demo program. It is very old and quite unknown but contains useful code for you. -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) 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
Re: [twsocket] TSmtpCli - How do I process multipleemails usingthiscomponent?
Greetings Fredrick, Are you using the TSmtpCli or TSyncSmtpCli component? You look to be processing mass e-mails, but where to you set the from, to, subject and MailMessage properties? I appreciate any additional information you can provide. Thanks, Mike - Original Message - From: Fredrik Larsson [EMAIL PROTECTED] To: 'ICS support mailing' twsocket@elists.org Sent: Tuesday, July 29, 2008 4:09 AM Subject: Re: [twsocket] TSmtpCli - How do I process multipleemails usingthiscomponent? Well something like this exists in my code. Some functions are my own but I think you get the picture. procedure TLCInheritSMTPDM.SmtpRequestDone(Sender: TObject; RqType: TSmtpRequest; ErrorCode: Word); begin if (error 0) then begin logMsg('Service Error occured RqType:'+inttostr(integer(RqType))+' Error:'+vartostr(error)); Exit; end; if RqType = smtpConnect then begin logMsg('Recived: smtpConnect, Sending HELO'); Smtp.Helo end else if RqType = smtpOpen then begin logMsg('Recived: smtOpen, sending MailFrom'); Smtp.MailFrom; end else if RqType = smtpHelo then begin logMsg('Recived: smtpHelo, Sending from'); Smtp.MailFrom; end else if RqType = smtpMailFrom then begin logMsg('Recived: smtpMailFrom, Sending to'); Smtp.RcptTo; end else if RqType = smtpRcptTo then begin logMsg('Recived: smtpRcptTo, Sending data'); Smtp.Data; end else if RqType = smtpData then begin logMsg('Recived: smtpData, Data sent'); //Are there any e-mail to send? if hasMail2send then begin logMsg('Sending next email'); //generate email to send here, set all values et.c. Smtp.MailFrom; end else begin logMsg('No more email to send, quitting.'); Smtp.Quit end end else if RqType = smtpQuit then begin logMsg('SMTP connection closed, restarting timer...'); SendTimer.Enabled := True; end; end; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SoftTech Sent: den 28 juli 2008 22:37 To: ICS support mailing Subject: Re: [twsocket] TSmtpCli - How do I process multiple emails usingthiscomponent? Greetings Francois, Thanks for your reply. I have looked at the article and am guessing the best place to loop thru a database to send out mass e-mail would be in the OnRequestDone event. Would that be correct? Does anyone have any code they can share of this event to show how they processed records in a database? Thanks, Mike - Original Message - From: Francois PIETTE [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, July 28, 2008 11:08 AM Subject: Re: [twsocket] TSmtpCli - How do I process multiple emails usingthiscomponent? You are trying to use an asynchronous (non-blocking) component as a synchronous (blocking) one. The solution is simple: think asynchronous, think events ! Have a look there: http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm Then come back here to ask for more questions... -- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) 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 -- 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
Re: [twsocket] TSmtpCli - How do I process multipleemailsusingthiscomponent?
Mike, If you read my posting you will see how to implement the RequestDone event. It's also explained in the wiki at http://wiki.overbyte.be/wiki/index.php/TSmtpCli.OnRequestDone There is a line of code where you re-populate the fields (subject, recips et.c.) and this is where you would read from the database. At the wiki it's explained as generateSingleEmail; //a procedure i use to create my e-mail What happens after the mailserver has sent you that it has received data you check if you have any more mail to send and then do a mail from again. If not then you do a quit. I use the normal SmtpCli. Regards, Fredrik. -- 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] TSmtpCli - How do I processmultipleemailsusingthiscomponent?
Sorry, I dericted you to the wrong code. Forget it. -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be - Original Message - From: SoftTech [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Tuesday, July 29, 2008 1:45 PM Subject: Re: [twsocket] TSmtpCli - How do I processmultipleemailsusingthiscomponent? Hi Francois, You say that the OnRequestDone event is the correct place to process mass e-mails using the TSmtpCli component and then direct me towards the v5 ICS MailRob source. I have looked at this source and there is no OnRequestDone source, but I do see that this source uses a TSyncSmtpCli component and that SendButtonClick event source contains what looks to be a way to send multiple emails using SmtpClient.OpenSync; instead of SmtpClient.Open; So can I gather that I should be using a TSyncSmtpCli component (using the SendButtonClick event source as a guide) instead of the TSmtpCli component using some form of coding in the onRequestDone event? I await you guidance. Thanks, Mike - Original Message - From: Francois Piette [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Tuesday, July 29, 2008 2:02 AM Subject: Re: [twsocket] TSmtpCli - How do I process multipleemailsusingthiscomponent? Thanks for your reply. I have looked at the article and am guessing the best place to loop thru a database to send out mass e-mail would be in the OnRequestDone event. Would that be correct? Yes, it is. Does anyone have any code they can share of this event to show how they processed records in a database? Have a look at ICS-V5 MailRob demo program. It is very old and quite unknown but contains useful code for you. -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) 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 -- 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] TSmtpCli - How do Iprocess multipleemailsusingthiscomponent?
Hi Fredrick, Sorry, I have somehow skipped over your comment //generate email to send here, set all values et.c. when reading your prior post. I was not aware of the wiki although I probably should have been as I have looked at other links on the website. I will give this a go and see what happens. Thanks again, Mike - Original Message - From: Fredrik Larsson [EMAIL PROTECTED] To: 'ICS support mailing' twsocket@elists.org Sent: Tuesday, July 29, 2008 7:03 AM Subject: Re: [twsocket] TSmtpCli - How do Iprocess multipleemailsusingthiscomponent? Mike, If you read my posting you will see how to implement the RequestDone event. It's also explained in the wiki at http://wiki.overbyte.be/wiki/index.php/TSmtpCli.OnRequestDone There is a line of code where you re-populate the fields (subject, recips et.c.) and this is where you would read from the database. At the wiki it's explained as generateSingleEmail; //a procedure i use to create my e-mail What happens after the mailserver has sent you that it has received data you check if you have any more mail to send and then do a mail from again. If not then you do a quit. I use the normal SmtpCli. Regards, Fredrik. -- 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
Re: [twsocket] TSmtpCli - How do I process multiple emails usingthiscomponent?
Greetings Francois, Thanks for your reply. I have looked at the article and am guessing the best place to loop thru a database to send out mass e-mail would be in the OnRequestDone event. Would that be correct? Does anyone have any code they can share of this event to show how they processed records in a database? Thanks, Mike - Original Message - From: Francois PIETTE [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, July 28, 2008 11:08 AM Subject: Re: [twsocket] TSmtpCli - How do I process multiple emails usingthiscomponent? You are trying to use an asynchronous (non-blocking) component as a synchronous (blocking) one. The solution is simple: think asynchronous, think events ! Have a look there: http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm Then come back here to ask for more questions... -- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) 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
Re: [twsocket] TSmtpCli Attach files without real files
I have not tried it but from looking at the sources I would say that it might work if you would change the OnAfterFileOpen event so that it passes the FStream as a var variable. Then you could initialize that stream variable with a memory- or stringstream in your event handler. Maybe you will have to do Base64-transcoding in your event handler also but there are routines for that in the MimeUtil unit. /Tobias Francois PIETTE wrote: Out of my mind without checking the source code: You may override the function which read the data frm file. Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be - Original Message - From: Wilfried Mestdagh [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Tuesday, May 22, 2007 6:29 PM Subject: [twsocket] TSmtpCli Attach files without real files Hello, I want to send mail with TSmtpCli with a few attached file. But I really do not want to create files on the disk unless absolutely nececarry. But I'm a little stuck on how to attach files because it seems to be designed to only get them from disk or is there something I do not see ? To be clear: forget the word 'file'. I have data and I want this data attached as a file with a name. For example 'test.txt' as it is a 'test.txt' file attached. It is a *.csv file and a *.txt file, no binary stuff, so maybe this could be very simple ? -- Rgds, Wilfried http://www.mestdagh.biz -- NOA Audio Solutions Vertriebsges .m.b.H. Tel: +43-1-5452700 Johannagasse 42/4 Fax: +43-1-545270014 A - 1050 Wien Www: http://www.noa-audio.com -- 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
Re: [twsocket] TSmtpCli Attach files without real files
Out of my mind without checking the source code: You may override the function which read the data frm file. Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be - Original Message - From: Wilfried Mestdagh [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Tuesday, May 22, 2007 6:29 PM Subject: [twsocket] TSmtpCli Attach files without real files Hello, I want to send mail with TSmtpCli with a few attached file. But I really do not want to create files on the disk unless absolutely nececarry. But I'm a little stuck on how to attach files because it seems to be designed to only get them from disk or is there something I do not see ? To be clear: forget the word 'file'. I have data and I want this data attached as a file with a name. For example 'test.txt' as it is a 'test.txt' file attached. It is a *.csv file and a *.txt file, no binary stuff, so maybe this could be very simple ? -- Rgds, Wilfried http://www.mestdagh.biz -- 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 -- 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
Re: [twsocket] TSmtpCli encoding (was: Freeze when using smtp afterrecreating itsparentform)
On Dec 22, 2006, at 05:28, Henrik wrote: Ok, so if I want to be sure that Swedish e-mails looks the same when they arrive to the recipient regardless of what language is used on the recipients computer I should encode the text message with QuotedPrintable? And this is done by setting the following properties? SmtpCli1.Allow8bitChars := false; (if I want the _subject_ encoded) SmtpCli1.DefaultEncoding := smtpEncQuotedPrintable; (to get the body encoded) This will encode the body. The headers (Subject and From/To lines) need to be encoded separately, as this is a fairly new mechanism used by many current mail clients, but not originally planed for in RFC-822 messages. This mechanism is a bit complex because it needs to include boundaries and meta-data within each encoded header. I suggest you search in Google for smtp message header encoding or something like that. dZ. -- DZ-Jay [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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
Re: [twsocket] TSmtpCli encoding (was: Freeze when using smtpafterrecreating itsparentform)
DZ-Jay wrote: On Dec 22, 2006, at 05:28, Henrik wrote: Ok, so if I want to be sure that Swedish e-mails looks the same when they arrive to the recipient regardless of what language is used on the recipients computer I should encode the text message with QuotedPrintable? And this is done by setting the following properties? SmtpCli1.Allow8bitChars := false; (if I want the _subject_ encoded) SmtpCli1.DefaultEncoding := smtpEncQuotedPrintable; (to get the body encoded) This will encode the body. The headers (Subject and From/To lines) need to be encoded separately, as this is a fairly new mechanism used by many current mail clients, but not originally planed for in RFC-822 messages. This mechanism is a bit complex because it needs to include boundaries and meta-data within each encoded header. I suggest you search in Google for smtp message header encoding or something like that. dZ. Hi dZ, Headers are indeed encoded in latest versions. It's my own, rather old work added to ICS in summer (or so). It works for me since a couple of years reliable, the code could be optimized of course. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- DZ-Jay [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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
Re: [twsocket] TSmtpCli encoding (was: Freeze when using smtp afterrecreating itsparentform)
Ok, so if I want to be sure that Swedish e-mails looks the same when they arrive to the recipient regardless of what language is used on the recipients computer I should encode the text message with QuotedPrintable? And this is done by setting the following properties? SmtpCli1.Allow8bitChars := false; (if I want the _subject_ encoded) SmtpCli1.DefaultEncoding := smtpEncQuotedPrintable; (to get the body encoded) // Henrik -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Arno Garrels Skickat: den 22 december 2006 10:30 Till: ICS support mailing Ämne: [twsocket] TSmtpCli encoding (was: Freeze when using smtp afterrecreating itsparentform) Bjørnar Nielsen wrote: I'm not sure, but I think the body of the email is automaticly encoded to quoted printable (the plain text part), I think others in this list knows In TSmtpCli it depends on properties DefaultEncoding as well as on Allow8bitChars. - Allow8bitChars: Default=TRUE, headers are not encoded. If FALSE headers and message text are encoded using method spezified in DefaultEncoding *if necessary. If DefaultEncoding is smtpEnc7bit or smtpEnc8bit quoted printable is used by default. - DefaultEncoding: Default=smtpEnc7bit, if smtpEncBase64 or smtpEncQuotedPrintable message text is always encoded. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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 -- 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
Re: [twsocket] TSmtpCli encoding (was: Freeze when using smtpafterrecreating itsparentform)
Henrik wrote: Ok, so if I want to be sure that Swedish e-mails looks the same when they arrive to the recipient regardless of what language is used on the recipients computer I should encode the text message with QuotedPrintable? That won't work, since TSmtpCli does not convert strings to different charsets (something that still is to be implemented), currently it should work when sender and receiver use the same charactersets. Encoding is to make the component RFC-conform, since characters beyond 128 are not allowed in SMTP by default. Only Unicode (UTF-8) garanties what you want. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html And this is done by setting the following properties? SmtpCli1.Allow8bitChars := false; (if I want the _subject_ encoded) SmtpCli1.DefaultEncoding := smtpEncQuotedPrintable; (to get the body encoded) // Henrik -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:twsocket- [EMAIL PROTECTED] För Arno Garrels Skickat: den 22 december 2006 10:30 Till: ICS support mailing Ämne: [twsocket] TSmtpCli encoding (was: Freeze when using smtp afterrecreating itsparentform) Bjørnar Nielsen wrote: I'm not sure, but I think the body of the email is automaticly encoded to quoted printable (the plain text part), I think others in this list knows In TSmtpCli it depends on properties DefaultEncoding as well as on Allow8bitChars. - Allow8bitChars: Default=TRUE, headers are not encoded. If FALSE headers and message text are encoded using method spezified in DefaultEncoding *if necessary. If DefaultEncoding is smtpEnc7bit or smtpEnc8bit quoted printable is used by default. - DefaultEncoding: Default=smtpEnc7bit, if smtpEncBase64 or smtpEncQuotedPrintable message text is always encoded. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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 -- 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
Re: [twsocket] TSmtpCli encoding (was: Freeze when usingsmtpafterrecreating itsparentform)
Bjørnar Nielsen wrote: I use the same component and send norwegian, swedish and even chinese chars in the subject (but Outlook can't show chinese in the subject on my computer). Use Quoted printable or Base64 to encode special chars. Example for Base64 could be like this (C++): HtmlSmtpCli1-HdrSubject = =?utf-8?B? + Base64Encode(UTF8Encode(SubjectInputFromUserEdit-Text)) + ?=;# Note that a line should not be longer than 75 characters otherwise it must be wrapped. So it's a bit more complicated, especially when headers contain e-mail addresses like TO, FROM etc. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html If you have a GUI-component that can handle WideStrings, then you can have any language in the subject using the above form. First the unicode- string is UTF8-encoded, then it is Base64-encoded and I think this form can hold any possible char. If you use Quoted printable instead you would save a little space because only the char's above 126 or so is encoded, I have code for this too if you ar interested. Regards Bjørnar imagine) so I'm planning to return to Indy as long as I can solve their issue with Swedish characters in the subject. -- 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
Re: [twsocket] TSmtpCli and Hebrew text
I suggest you build a message using Outlook and the same with ICS component. Then compare both structure and findout the differences. -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: Vlad Gonchar [EMAIL PROTECTED] To: twsocket@elists.org Sent: Friday, December 23, 2005 3:22 PM Subject: [twsocket] TSmtpCli and Hebrew text How I can send email with body in Hebrew? Usually I work in English US local. I would like to use TSmtpCli. If I specify ContentType := smtpHTML, my Microsoft Outlook receives the text as question marks. Thank you, Vlad -- 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 -- 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
Re: [twsocket] TSmtpCli and Hebrew text
You should make sure to set the charset attribute of the Content-Type header as the proper character set for your message. Example: Content-Type: text/html; charset=UTF-8 dZ. On Dec 23, 2005, at 09:22, Vlad Gonchar wrote: How I can send email with body in Hebrew? Usually I work in English US local. I would like to use TSmtpCli. If I specify ContentType := smtpHTML, my Microsoft Outlook receives the text as question marks. Thank you, Vlad -- 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 -- 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