1
我有以下幾點:笨:在自動加載配置文件替代變量
配置/ email.php
$config['protocol'] = 'smtp';
$config['smtp_host'] = "xxxxxx";
$config['smtp_user'] = "xxxxxx";
$config['smtp_pass'] = "xxxxxx";
$config['smtp_port'] = xx;
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";
所以在大多數情況下,我送HTML與純文本替代電子郵件。這個配置完美地工作。
現在,在一個特殊的情況,我想,所以我需要越過設定發送純文本電子郵件:$config['mailtype'] = 'text';
我怎麼能這樣做?我試着指定一個新的配置陣列,並再次加載庫,但它仍然將是HTML:
$email_config = Array(
'mailtype' => 'text'
);
$this->load->library('email', $email_config);
相同的答案被張貼在半小時前... –