Welcome Guest, Not a member yet? Register   Sign In
BCC mail, from 5 to 500 addresses
#1

[eluser]popovich[/eluser]
I know, there is a number of topics regarding bulk emails and mailing lists. The problem I have is quite strange, though.

Here is the code:

Code:
$rcpt_list="";
            foreach($rcpt_res->result() as $row) {
                if( valid_email($row->email) ){
                    $rcpt_list .= $row->email.", ";
                }
            }        
            $rcpt_list .= " [email protected]";

            $config['charset'] = 'utf-8';
            $config['mailtype'] = 'html';
            $config['validate'] = TRUE;
            $config['bcc_batch_mode'] = TRUE;
            $config['bcc_batch_size'] = 50;
            $this->email->initialize($config);
            
            
            $inc = str_replace('media_center/newsletter/','newsletter_archive/',$nl_data['trigger_str']);    // include...
            $inc .= '/index.html';
            $topline = '<div style="width: 800px; margin: 0 auto; padding: 0px; text-align: center; font-size: 9px; color: #666;"><a style="color:#777; font-size: 9px;" href="'.base_url().$nl_data['trigger_str'].'">'.base_url().$nl_data['trigger_str'].'</a></div>';
            $fullinclude = $topline.file_get_contents($inc);
            
            $this->email->from('[email protected]', 'domainNewsletter');
            $this->email->to('[email protected]', 'domainNewsletter');
            $this->email->bcc($rcpt_list);
            
            $this->email->subject($nl_data['header']);
            $this->email->message($fullinclude);
            
            $sent = $this->email->send();

which gathers the email addresses into one string
passes them to bcc field
sends emails... NOT

There are 5 addresses for now (at testing grounds). There will be about 500 later. The emails get to google mail and to one other recipient at the same domain I am in, but not to me. The third domain doesn't get the email eigther. I've checked the string and it seems to be alrgight: comma separated, validated emails.

I had changed the script from sending one email per addressee to sending an email to bcc list to save server load and execution time. But it seems to have problems now...

Any idea?
Thanks.
#2

[eluser]TheFuzzy0ne[/eluser]
Mail will not always arrive instantly. For some reason some mail sent from my home server takes up to 12 hours to arrive at it's destination. Sending to my GMail account, it's virtually instant.




Theme © iAndrew 2016 - Forum software by © MyBB