Sending multiple e-mail msg to multiple e-mail addresses

  • Thread starter Niklas Östergren
  • Start date
N

Niklas Östergren

Hi!

I´m about to create code so the user can send the same e-mail message to
multiple recivers. A couple of times a year the user have to send msg to
every member in the assosiation (between. 200 - 250 e-mail addresses). But
since a mail with 200 e-mail addresses can be consider as spaming we want to
send the e-mail´s i batches of a dynamic number of address, stored in a
table editable by the user. So the user can set how many e-mail addresses
each batch of e-mail addresses shall contain.Our experience is that it
should not be more than 50 addresses per mail. Which means that wh need to
send 4 - 5 e-mials and I have to populate the array, holding the e-mail
addresses, 4 - 5 times

The problem that I see so far is:
- How do I make the code to break after creating each e-mail message,
waiting for the user to send it?
- How do I know when to continu with creating the next mail after the user
have sent the prevoius mail?

One way of doing this easy for me is to create ALL e-mail msg at the same
time ending up with having 4 - 5 e-mails poping up on the screen waiting for
the user to press command button <Send>. But this can get quit messy for the
user and what happens if some funny person change the variable to 1
address/mail. Then the code creates 200 - 250 mails poping up on the screen.
Noting I would be verry happy about. Not to menthion the user.

Another way of dealing with this, which would be quit easy for me is to NOT
pop the msg up at the screen but to actually send all mails automaticly and
then display a msg to the user about what have happend. This on the other
hand will cause the user problem since the internet connection is of modem
type 56 kb/s and hwo knows what the mail contains (attached files, pictures
etc.) So this can take a verry long time without the user beeing able to
break the sendings without turning the modem off. And the code, in my
application, not knowing how fare we have come (which e-mail addresses that
have been sent to).

Therfore I want to split the sending up and give the user the final desition
about IF to send the msg or not in as large batches as the user find´s
convenient.

I´m new to this with array´s and have played around a little woth it during
yesterday and also read about it. I don´t know enough to populate and
retreive an array without an example or my books. But I know how to use it
if I see an example and I understand the code, it´s just that I don´t
remember everything yet.

So fare I have found out that I probably should use method <GetRows> since
this gives me the advantage of knowing which next record is to strat getting
the next batch from. I have allready tryed this out, not with actually
sending e-mails but to populating an array with integers from a recordset
and to retrive them by using Debug.Print.

As you can se I have som major problems to make this work, since i don´t
have a clue about how to stop the code and when to start again. Offfcourse I
can pop up a MsgBox where the user can select to continu to the next batch
or not but is that going to work?

TIA!
// Niklas
 
H

Harry Betlem

Niklas,

I'm just 'plain thinking'.
Maybe you could make a query on the e-mail adresses.
If the Table, with the addresses, contains a field (True/False) you can set it
to True, after mails have been created. (in code)

Try to send 50 mails by using an Loop
(For i = 1 to 50
send then mail
set the 'send' to true
i = i +1
next i

Maybe this might help you

Harry

In Niklas Östergren dropped
the following:
|| Hi!
||
|| I´m about to create code so the user can send the same e-mail
|| message to multiple recivers. A couple of times a year the user have
|| to send msg to every member in the assosiation (between. 200 - 250
|| e-mail addresses). But since a mail with 200 e-mail addresses can be
|| consider as spaming we want to send the e-mail´s i batches of a
|| dynamic number of address, stored in a table editable by the user.
|| So the user can set how many e-mail addresses each batch of e-mail
|| addresses shall contain.Our experience is that it should not be more
|| than 50 addresses per mail. Which means that wh need to send 4 - 5
|| e-mials and I have to populate the array, holding the e-mail
|| addresses, 4 - 5 times
||
|| The problem that I see so far is:
|| - How do I make the code to break after creating each e-mail message,
|| waiting for the user to send it?
|| - How do I know when to continu with creating the next mail after
|| the user have sent the prevoius mail?
||
|| One way of doing this easy for me is to create ALL e-mail msg at the
|| same time ending up with having 4 - 5 e-mails poping up on the
|| screen waiting for the user to press command button <Send>. But this
|| can get quit messy for the user and what happens if some funny
|| person change the variable to 1 address/mail. Then the code creates
|| 200 - 250 mails poping up on the screen. Noting I would be verry
|| happy about. Not to menthion the user.
||
|| Another way of dealing with this, which would be quit easy for me is
|| to NOT pop the msg up at the screen but to actually send all mails
|| automaticly and then display a msg to the user about what have
|| happend. This on the other hand will cause the user problem since
|| the internet connection is of modem type 56 kb/s and hwo knows what
|| the mail contains (attached files, pictures etc.) So this can take a
|| verry long time without the user beeing able to break the sendings
|| without turning the modem off. And the code, in my application, not
|| knowing how fare we have come (which e-mail addresses that have been
|| sent to).
||
|| Therfore I want to split the sending up and give the user the final
|| desition about IF to send the msg or not in as large batches as the
|| user find´s convenient.
||
|| I´m new to this with array´s and have played around a little woth it
|| during yesterday and also read about it. I don´t know enough to
|| populate and retreive an array without an example or my books. But I
|| know how to use it if I see an example and I understand the code,
|| it´s just that I don´t remember everything yet.
||
|| So fare I have found out that I probably should use method <GetRows>
|| since this gives me the advantage of knowing which next record is to
|| strat getting the next batch from. I have allready tryed this out,
|| not with actually sending e-mails but to populating an array with
|| integers from a recordset and to retrive them by using Debug.Print.
||
|| As you can se I have som major problems to make this work, since i
|| don´t have a clue about how to stop the code and when to start
|| again. Offfcourse I can pop up a MsgBox where the user can select to
|| continu to the next batch or not but is that going to work?
||
|| TIA!
|| // Niklas
 
N

Niklas Östergren

Hi Harry!

yes, that´s possible. Not that I have, or need, a field with true/false in
the table since I have a <SendDate> field in which I set the date the mail
was sent. And in this table I store the Dispatch Delivery for each e-mail
address so I know which addresses that have recived which dispatch.

Thank´s for the idéa. I´ll think of it because it´s a easyer way of doing
what I´m trying right now.

// Niklas
 
H

Harry Betlem

Niklas,

In Niklas Östergren dropped
the following:
|| Hi Harry!
||
|| yes, that´s possible. Not that I have, or need, a field with
|| true/false in the table since I have a <SendDate> field in which I
|| set the date the mail was sent. And in this table I store the
|| Dispatch Delivery for each e-mail address so I know which addresses
|| that have recived which dispatch.

That's all the same. In the end the effect comes to the 'remaining' records.
You simply 're-use' that query, in which the <SendDate> is still empty.

||
|| Thank´s for the idéa. I´ll think of it because it´s a easyer way of
|| doing what I´m trying right now.

Why not do things in a simple way?
(KIBS)
||
|| // Niklas
||
|| "Harry Betlem" <[email protected]> skrev i meddelandet
|| ||| Niklas,
|||
||| I'm just 'plain thinking'.
||| Maybe you could make a query on the e-mail adresses.
||| If the Table, with the addresses, contains a field (True/False) you
||| can set it
||| to True, after mails have been created. (in code)
|||
||| Try to send 50 mails by using an Loop
||| (For i = 1 to 50
||| send then mail
||| set the 'send' to true
||| i = i +1
||| next i
|||
||| Maybe this might help you
|||
||| Harry
|||
||| In Niklas Östergren
||| dropped the following:
||||| Hi!
|||||
||||| I´m about to create code so the user can send the same e-mail
||||| message to multiple recivers. A couple of times a year the user
||||| have to send msg to every member in the assosiation (between. 200
||||| - 250 e-mail addresses). But since a mail with 200 e-mail
||||| addresses can be consider as spaming we want to send the e-mail´s
||||| i batches of a dynamic number of address, stored in a table
||||| editable by the user. So the user can set how many e-mail
||||| addresses each batch of e-mail addresses shall contain.Our
||||| experience is that it should not be more than 50 addresses per
||||| mail. Which means that wh need to send 4 - 5 e-mials and I have
||||| to populate the array, holding the e-mail addresses, 4 - 5 times
|||||
||||| The problem that I see so far is:
||||| - How do I make the code to break after creating each e-mail
||||| message, waiting for the user to send it?
||||| - How do I know when to continu with creating the next mail after
||||| the user have sent the prevoius mail?
|||||
||||| One way of doing this easy for me is to create ALL e-mail msg at
||||| the same time ending up with having 4 - 5 e-mails poping up on the
||||| screen waiting for the user to press command button <Send>. But
||||| this can get quit messy for the user and what happens if some
||||| funny person change the variable to 1 address/mail. Then the code
||||| creates 200 - 250 mails poping up on the screen. Noting I would
||||| be verry happy about. Not to menthion the user.
|||||
||||| Another way of dealing with this, which would be quit easy for me
||||| is to NOT pop the msg up at the screen but to actually send all
||||| mails automaticly and then display a msg to the user about what
||||| have happend. This on the other hand will cause the user problem
||||| since the internet connection is of modem type 56 kb/s and hwo
||||| knows what the mail contains (attached files, pictures etc.) So
||||| this can take a verry long time without the user beeing able to
||||| break the sendings without turning the modem off. And the code,
||||| in my application, not knowing how fare we have come (which
||||| e-mail addresses that have been sent to).
|||||
||||| Therfore I want to split the sending up and give the user the
||||| final desition about IF to send the msg or not in as large
||||| batches as the user find´s convenient.
|||||
||||| I´m new to this with array´s and have played around a little woth
||||| it during yesterday and also read about it. I don´t know enough to
||||| populate and retreive an array without an example or my books.
||||| But I know how to use it if I see an example and I understand the
||||| code, it´s just that I don´t remember everything yet.
|||||
||||| So fare I have found out that I probably should use method
||||| <GetRows> since this gives me the advantage of knowing which next
||||| record is to strat getting the next batch from. I have allready
||||| tryed this out, not with actually sending e-mails but to
||||| populating an array with integers from a recordset and to retrive
||||| them by using Debug.Print.
|||||
||||| As you can se I have som major problems to make this work, since i
||||| don´t have a clue about how to stop the code and when to start
||||| again. Offfcourse I can pop up a MsgBox where the user can select
||||| to continu to the next batch or not but is that going to work?
|||||
||||| TIA!
||||| // Niklas
 
N

Niklas Östergren

Harry!

"That's all the same. In the end the effect comes to the 'remaining'
records.
You simply 're-use' that query, in which the <SendDate> is still empty"

Yes I know!

"Why not do things in a simple way?"

Because I´m allmost finished with this wizard and I have spent a lot of time
developing this and even if using tab-control is much simpler I know that
I´ll need to spend more time on developing a new wizard then to finsh this
one of.

But I´ll sure have this in mind next wizard I need to do. So thank you for
highlighting this for me!

// Niklas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top