Re: [twsocket] Html email to many users

2006-02-28 Thread Francois Piette
Have a look at MailSndAsync sample program (Delphi) delivered with ICS. It is 
mostly what you want
to do.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


- Original Message - 
From: Pawel (WP) [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Monday, February 27, 2006 9:08 PM
Subject: Re: [twsocket] Html email to many users


 Francois, You writed:
 (...) Instead of programming a loop, you must use the event. You simply
 start your
 first mail send and then do nothing until the event signaling the end of
 request os done. Then only you pick the next mail from your list and send
 it.
 Using this scheme, you can go faster by user multiple component. Each one
 will send a mail without blocking the others (Note that some email servers
  limit the number of concurrent connections, so you may want to use only one
  component per destination server. Be clever !) (...)

 Thanks for quick answer. But...
 What event I have to use? Could anybody write me this more clear? Can
 somebody correct my code?
 I am just begining with ICS...
 Best regards

 - Original Message - 
 From: Francois PIETTE [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Monday, February 27, 2006 8:32 PM
 Subject: Re: [twsocket] Html email to many users


   for i:= 0 to Lista.Count-1  do   // from 0 to 1
  begin
SendMail(Lista.Strings[i]);
  end;
  And - what am I doing wrong - this doesn't work. Sending email is like in
  demo program.
  I have message:
  SmtpException: SMTP component not ready
 
  Your problem is a classical one: Your are trying to use a non-blocking
  event-driven component as a blocking one.
  The component will send your email in the background while your program is
  doing other things. Of course a single component can send only one mail at
  a
  time. When you do a loop, the first iteration start sending a mail. Then
  second iteration would also send a mail while the previous is still
  occuring
  and therefore you get the component busy error.
 
  Instead of programming a loop, you must use the event. You simply start
  your
  first mail send and then do nothing until the event signaling the end of
  request os done. Then only you pick the next mail from your list and send
  it.
 
  Using this scheme, you can go faster by user multiple component. Each one
  will send a mail without blocking the others (Note that some email servers
  limit the number of concurrent connections, so you may want to use only
  one
  component per destination server. Be clever !).
 
  --
  Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
  --
  [EMAIL PROTECTED]
  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
 
 


 -- 
 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] Html email to many users

2006-02-27 Thread Francois PIETTE
  for i:= 0 to Lista.Count-1  do   // from 0 to 1
 begin
   SendMail(Lista.Strings[i]);
 end;
 And - what am I doing wrong - this doesn't work. Sending email is like in 
 demo program.
 I have message:
 SmtpException: SMTP component not ready

Your problem is a classical one: Your are trying to use a non-blocking 
event-driven component as a blocking one.
The component will send your email in the background while your program is 
doing other things. Of course a single component can send only one mail at a 
time. When you do a loop, the first iteration start sending a mail. Then 
second iteration would also send a mail while the previous is still occuring 
and therefore you get the component busy error.

Instead of programming a loop, you must use the event. You simply start your 
first mail send and then do nothing until the event signaling the end of 
request os done. Then only you pick the next mail from your list and send 
it.

Using this scheme, you can go faster by user multiple component. Each one 
will send a mail without blocking the others (Note that some email servers 
limit the number of concurrent connections, so you may want to use only one 
component per destination server. Be clever !).

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
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] Html email to many users

2006-02-27 Thread Pawel (WP)
Francois, You writed:
(...) Instead of programming a loop, you must use the event. You simply
start your
first mail send and then do nothing until the event signaling the end of
request os done. Then only you pick the next mail from your list and send
it.
Using this scheme, you can go faster by user multiple component. Each one
will send a mail without blocking the others (Note that some email servers
 limit the number of concurrent connections, so you may want to use only one
 component per destination server. Be clever !) (...)

Thanks for quick answer. But...
What event I have to use? Could anybody write me this more clear? Can
somebody correct my code?
I am just begining with ICS...
Best regards

- Original Message - 
From: Francois PIETTE [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Monday, February 27, 2006 8:32 PM
Subject: Re: [twsocket] Html email to many users


  for i:= 0 to Lista.Count-1  do   // from 0 to 1
 begin
   SendMail(Lista.Strings[i]);
 end;
 And - what am I doing wrong - this doesn't work. Sending email is like in
 demo program.
 I have message:
 SmtpException: SMTP component not ready

 Your problem is a classical one: Your are trying to use a non-blocking
 event-driven component as a blocking one.
 The component will send your email in the background while your program is
 doing other things. Of course a single component can send only one mail at 
 a
 time. When you do a loop, the first iteration start sending a mail. Then
 second iteration would also send a mail while the previous is still 
 occuring
 and therefore you get the component busy error.

 Instead of programming a loop, you must use the event. You simply start 
 your
 first mail send and then do nothing until the event signaling the end of
 request os done. Then only you pick the next mail from your list and send
 it.

 Using this scheme, you can go faster by user multiple component. Each one
 will send a mail without blocking the others (Note that some email servers
 limit the number of concurrent connections, so you may want to use only 
 one
 component per destination server. Be clever !).

 --
 Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
 --
 [EMAIL PROTECTED]
 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

 


-- 
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