Welcome Guest, Not a member yet? Register   Sign In
BCC/CC email not working with Email class?
#1

[eluser]mvdg27[/eluser]
Hi guys,

I'm running into a weird problem. For some reason I'm not able to send cc or Bcc emails with the codeigniter email class. I've double checked several times whether the email addresses were properly set. I've even hard coded my email address. The email is delivered to the 'To' address, but CC and Bcc never reach their destination.

The weirdest thing is that in a situation where I use a CC, this is indicted in the email of the To-recipient. But still no delivery at the CC address itself.

Any ideas of where to start looking?

Thanks in advance, Michiel
#2

[eluser]sophistry[/eluser]
hi michiel -

you need to post code. for instance, how are you sending email? mail? sendmail? smtp?

also, i believe there is a BCC/clear() bug that has yet to be addressed... probably not related, but since you are using BCC you should really watch out that you don't fall into that problem.

cheers.
#3

[eluser]matt2012[/eluser]
im also experiencing this
#4

[eluser]Unknown[/eluser]
I've just encountered the same problem with "bcc" not actually mailing (the "To" email is sent fine).

Code:
$lf = "\n\r";
$this->load->library('email');
$config['charset'] = 'ISO-8859-1';
$config['wordwrap'] = TRUE;
$config['useragent'] = 'XXXX Order Processing System';
$this->email->initialize($config);
$this->email->from('[email protected]','XXXX');
$this->email->bcc('[email protected]');
$customer_details = $this->M_orders->get_customer_details($order_number);
$order_details = $this->M_orders->get_order_details($order_number);
$lead_time = $this->M_orders->get_leadtime($order_number);
$this->email->to($customer_details['Email']);
$this->email->subject('XXXX: Order Confirmation (order number '.$order_number.')');
$message = "Many thanks for your order ".$customer_details['Firstname'].". It will be delivered to:".$lf.$lf;
$message .= $customer_details['Firstname']." ".$customer_details['Surname'].$lf;
$message .= $customer_details['AddressLine1'].$lf;
....snip.....
$this->email->message($message);
$this->email->send();

Any thoughts?
#5

[eluser]CI_adis[/eluser]
I am having the same problem! It is frustating but no one has a solution or thought??
#6

[eluser]goodbytes[/eluser]
This problem is still here...
#7

[eluser]goodbytes[/eluser]
I think I figured it out. It's actually very stupid, but gmail and other providers will not deliver mails from and to the same domain name. Try populating your BCC with email addresses from other domains and they should arrive just fine. Of course, when you test things out, you often just use an address on the same domain as where your app is running.
#8

[eluser]edidas[/eluser]
$bcc_emails=array('[email protected]', '[email protected]');
$this->email->bcc($bcc_emails);

if still not working, check in config\email.php:

$config['bcc_batch_mode'] = true;
$config['bcc_batch_size'] = 5;




Theme © iAndrew 2016 - Forum software by © MyBB