CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 bulk emails

Print topic Send  topic

Author Message
viktor
Posted: 07/22/2005, 1:35 PM

Question:

Does anyone has a neat and simple solutions / explanation / tip as to how to send a message from a form to more then one email?

There were some discussions which where closed without particular solution or clear map.

So far I've done an insert record with two textboxes (one for future subject and second for future body of the message).

But what if I need send that message to more then one receipient and this LIST is being triggered from users table, for instance?

Also I would like to have each receipient to receive email addressed only to her / him.

Thanks in advance,

Viktor
datadoit.com
Posted: 07/22/2005, 7:38 PM

Where you would normally have $to =whoever@whatever.com, use a function
call to gather e'mail addresses.

$to = GetAddresses();

function GetAddresses() {

// Create a datasource on the fly, and read the "to" info
$db = new clsDBInternetDB();
$SQL = "SELECT to_email FROM admin_to_users_mail"; // ** Change to match
your database **
$db->query($SQL);

$to = "";

$sep = ""; // separator between addresses
if ($db->next_record())
{
do
{
$to = $to . $sep . $db->f("to_email"); // ** Change the field name
to match your database **
if (!$sep) {
$sep = ", "; // Subsequent addresses get separated by a comma
}
} while ($db->next_record());
}
return $to;

} // end of function.

This is per DonB (www.GotoDon.com)

-MikeR

viktor
Posted: 08/08/2005, 6:55 AM

Thanks Mike!

Very useful - and it works.

two question:

1) How can I send it to all people so that they would not see it. Shall I put them all into bcc and not into to?

2) What if I have over 300 emails -- will the sytem do it ok? maybe there is a way to send each email one by one?

Thanks

Viktor
Walter Kempees
Posted: 08/11/2005, 7:10 AM

The bcc is the best (and only) way to adress a group of people without
giving away adresses.

The example before, put it in a loop if to adress each adressee with iths
own email.
Sending one email to 300 adresses is handled by the mailserver which should
be the way to go.


"viktor" <viktor@forum.codecharge> schreef in bericht
news:542f76455c7a65@news.codecharge.com...
> Thanks Mike!
>
> Very useful - and it works.
>
> two question:
>
> 1) How can I send it to all people so that they would not see it. Shall I
> put
> them all into bcc and not into to?
>
> 2) What if I have over 300 emails -- will the sytem do it ok? maybe there
> is a
> way to send each email one by one?
>
> Thanks
>
> Viktor
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.