Welcome Guest, Not a member yet? Register   Sign In
Codeigniter sending blank emails when more then one email is sent in a single request
#5

(09-17-2015, 10:03 AM)mwhitney Wrote: Try moving the calls to initialize()/set_newline() into your send_email() method (you should probably store the $config array in a property, just don't name the property $config, for hopefully obvious reasons).

Already tried this too, soz should have mentioned it in my initial post. I've tried moving the initialize() & set_newline() along with the config array in to the send_email() method with no luck, I've also tried destroying the email class via unset() and re-initialising / re-loading it right before I start sending the email too, so each time an email is sent everything should be starting from scratch again, no luck. 

The problem with making the $config array a property of my emailer class is it needs to call to the config class which I don't think is possible in the property, I've run into errors when trying that, so I'd still need to set the values for the $config array property in the construct or send_email method, neither of which makes a difference either. Sad

What I can't get my head around is why the $_body property of the email class is blank when I'm calling $this->email->message() the second time round, looking at the code in the email class for the message() method I can't see anything there there that could possibly cause it not to be set only on the second time it's called.
Reply


Messages In This Thread
RE: Codeigniter sending blank emails when more then one email is sent in a single request - by webdev25 - 09-17-2015, 10:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB