Welcome Guest, Not a member yet? Register   Sign In
Multiple emails send to only one specific email adress
#1

[eluser]Thyvo[/eluser]
Hello,

I'm having a problem with sending mails, every time I want to send a email it only gets recieved by one email adress (note that for some reason its only gets recieved to this emailadress, if I leave it out of the mailing list, no-one gets a email in the paste below its [email protected])
I used the $this->email->print_debug function and I get this
Code:
Your message has been successfully sent using the following protocol: sendmail
User-Agent: CodeIgniter
Date: Sun, 17 Jun 2012 13:58:53 +0200
Bcc: [email protected], [email protected], [email protected], [email protected], [email protected]
From: "[email protected]"
Return-Path:
Subject: =?iso-8859-1?Q?Urgent_email!?=
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

New urgent report
Subject: fesfesf
Visit http://subdomain.domain.be/
uitgevoerd

now for my code I have

Code:
&lt;?php
class Emails extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
    function urgent($date, $subject){
     $this->load->library('email');
  $inc = $this->db->query("SELECT * FROM `users` WHERE `mailing` = 1 ORDER BY  `users`.`name` ASC ");
  $emails = $inc->result();
  $adres = array();
  foreach($emails as $emailys){
   $adres[] = $emailys->email;
  }
  print_r($adres);
   $message = "New urgent report \n Subject: $subject \n Visit http://subdomain.domain.be/";  
   $this->email->bcc_batch_mode = true;
   $this->email->bcc_batch_size = 50;
   $this->email->bcc($adres);

   $this->email->from('[email protected]','Reporter');
   $this->email->subject('Urgent email!');
   $this->email->message($message);
   set_time_limit(0);
   ignore_user_abort(true);
   $this->email->send();
   echo $this->email->print_debugger();
}
}
?&gt;

#2

[eluser]Glazz[/eluser]
Have you checked the spam folder ?
#3

[eluser]Thyvo[/eluser]
[quote author="Glazz" date="1339940267"]Have you checked the spam folder ?[/quote]
yes I did, there were no mails
#4

[eluser]InsiteFX[/eluser]
I think you are missing the comma after each emial address. Email address in a batch need to be seperated by a comma.

#5

[eluser]Thyvo[/eluser]
[quote author="InsiteFX" date="1339949993"]I think you are missing the comma after each emial address. Email address in a batch need to be seperated by a comma.

[/quote]
Can you give me a small example? I do not realtime know what you mean
#6

[eluser]InsiteFX[/eluser]
Code:
$adres[] = $emailys->email.",";
$this->email->bcc()

Sets the BCC email address(s). Just like the "to", can be a single email, a comma-delimited list or an array.

You may also need to enclose all of them with a beggining quote and the last one with an ending quote.
#7

[eluser]Thyvo[/eluser]
I tryed:
Code:
$adres[] = "'".$emailys->email."'";
//and
$adres[] = "'".$emailys->email."',";
//and
$adres[] = $emailys->email.",";
none of them worked :/
I diden't get any mails at all using those 3 methodes
#8

[eluser]rip_pit[/eluser]
I don't have a clue about the problem but i would start looking at this points:

- Try using simply 1 adress in bcc and see if it works better.

- does the CC field works ? (if yes then the email library and BCC might need a fix)

- if it urge, you can still send 1 email per adress and forgot about the bcc field, but it's a load of work.

anyway, here's what i get when i send myself a CC mail (headers are similar to BCC)

let's use know if you find something

Could it be related to a hosting limitation ?
#9

[eluser]InsiteFX[/eluser]
He already stated above that he gets one email so it is working but not for multiples.

I checked the Email Class tonight and it does add the comma so your problem is some place else.




Theme © iAndrew 2016 - Forum software by © MyBB