Jump to content

Change destination email in looping email


dantoni

Recommended Posts

Hello..

 

I've a problem about how to change our destination and the consecutively. As example, today the email will be sent to A,B,C and tomorrow the email will be sent to B,C,A until next week. Next week the email will be sent to D,E,F.

 

Code for looping email..

<?php
$to = array('ikrom.shabri@yahoo.com','1.k.rom.pc@gmail.com');
foreach($to as $mail)
{
        usleep(60000000);
        mail($mail,$subject,$email,$headers);
}
?>

 

Thank you for your assistance..

Link to comment
Share on other sites

Hello..

 

I've a problem about how to change our destination and the consecutively. As example, today the email will be sent to A,B,C and tomorrow the email will be sent to B,C,A until next week. Next week the email will be sent to D,E,F.

 

You need to define a clear logic. Sending emails to three people is the same regardless of what order you send them in. Figure out your logic, because what you've said doesn't make much sense.

Link to comment
Share on other sites

For example, today i want deliver the message to client A,B,C and D.

Here the code...

<?php
$to = array('ikrom.shabri@yahoo.com','1.k.rom.pc@gmail.com');
foreach($to as $mail)
{
        usleep(60000000);
        mail($mail,$subject,$email,$headers);
}

$to = array('me@gmail.com','you@hotmail.com');
foreach($to as $mail)
{
        usleep(120000000);
        mail($mail,$subject,$email,$headers);
}
?>

and 1 week later, the destination automatically change to client E,F,G,H.

What function should I use for this case ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.