Jump to content

change

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

change's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Superpimp, Actually, the problem isn't in the sending of the mail. It's in the loop or array. I want it to email each of the different items from the array separately. The way it's doing it now, it's sending one email that has 1 array result, then it's sending a second email that has 2 array results, then it's sending a third email that has 3 array results. Any ideas?
  2. When i run this script below it prints out correctly on screen (echo $value) and gives me the following: milk eggs bread However, the emails that I receive for each array value is incorrect. It should send me 3 separate emails that have just one of each value in them. In other words, one email would have milk, the next would have eggs, the next would have bread. However, what I'm getting is one email that has milk, the next has milk and eggs, and the last one has milk, eggs, and bread. Please help! :) <?php $array = array('milk','eggs','bread'); foreach ($array as $array => $value) { $mailbody.="$value\n\n"; mail("me@myself.com", "testing 123", "$mailbody", "From: Myself<me@myself.com>"); echo "<p>$value</p>"; } ?>
×
×
  • 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.