Welcome Guest, Not a member yet? Register   Sign In
Email Class SVN
#1

[eluser]bardelot[/eluser]
Hi,

- The user guide states that the email class loads the config/email.php automatically but it won't.

- When a config is passed to the "initialize"-function the "clear"-function then sets a "User-Agent"-header (using the old config) but later when sending a "X-Mailer"-header is added (using the new config). So it will end up with:
User-Agent: CodeIgniter
X-Mailer: new useragent

SVN: 788

bardelot
#2

[eluser]bardelot[/eluser]
The problem with the config has been fixed in the svn, and here is an example to the header problem.

Code:
$this->load->library('email');
$list = array ('T1' => '[email protected]', 'T2' => '[email protected]');
foreach ($list as $name => $address) {
  $this->email->to($address);
  $this->email->from('[email protected]');
  $this->email->subject('Here is your info '.$name);
  $this->email->message('Hi '.$name.' Here is the info you requested.');
  $this->email->send();    
  $this->email->clear();
}

In the first email the header will be:
User-Agent: CodeIgniter
X-Mailer: <your config value>

and in the second it is:
User-Agent: <your config value>
X-Mailer: <your config value>

Do you need the "User-Agent" and the "X-Mailer" Header or would one be enough?




Theme © iAndrew 2016 - Forum software by © MyBB