Welcome Guest, Not a member yet? Register   Sign In
Email Helper only sends one of three emails successfully
#4

[eluser]BrianDHall[/eluser]
First, try sending 2-3 emails using mail() in a row to yourself in a loop. If it works locally but not on the upload server then it is a server configuration issue more than its a code issue.

If this manual mail() works on the server then it is back into the code.

For pure code change, try this:

Quote:$this->email->clear()

Initializes all the email variables to an empty state. This function is intended for use if you run the email sending function in a loop, permitting the data to be reset between cycles.

Code:
foreach ($list as $name => $address)
{
    $this->email->clear();

    $this->email->to($address);
    $this->email->from('[email protected]');
    $this->email->subject('Here is your info '.$name);
    $this->email->message('Hi '.$name.' Here is the info you requested.');
    $this->email->send();
}
If you set the parameter to TRUE any attachments will be cleared as well:

$this->email->clear(TRUE);


Messages In This Thread
Email Helper only sends one of three emails successfully - by El Forum - 09-21-2009, 03:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB