Welcome Guest, Not a member yet? Register   Sign In
Email Class - does not send when using an array for the TO
#1

[eluser]corkscrew[/eluser]
Attempting to send emails using the CI Email Class. Sends emails as long as I use a comma-delimited list of email addresses. If I use an array (from the db) it displays a message saying that the email was sent - but does not actually send an email. That is - no messages are received. very confusing - any ideas would be appreciated.

Code:
$this->load->library('email');
        $addresses = $this->MEmails->emails();

        $config['protocol'] = 'sendmail';
        $config['mailpath'] = '/usr/sbin/sendmail';
        $this->email->initialize($config);

        $this->email->from('[email protected]','Tom');
        $this->email->to($addresses);
        $this->email->subject('Maintenance');
        $this->email->message('Test configuration');

        $this->email->send();

        if (! $this->email->send()) {
            echo "Email did not Send";
            echo $this->email->print_debugger();

        }


Messages In This Thread
Email Class - does not send when using an array for the TO - by El Forum - 05-03-2010, 08:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB