我试图在特定操作触发后向所有工作人员发送电子邮件。一切正常。但是,我注意到电子邮件不适用于拥有我们域名电子邮件地址的人。除此之外,我试图检查使用gmail,yahoo或hotmail的人收到的电子邮件。最有趣的是,他们可以看到所有电子邮件地址的列表,包括那些没有收到它的人。我只是想知道,它可能是什么原因?将任何电子邮件发送到私有域是否有任何限制?我不认为。我正在使用codeigniter email library
,以下是我的代码。
$config = Array(
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);
$message = $this->load->view('request/template', $d, true);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('no-reply@austecservices.com.au','Austec Services Pty Ltd'); // change it to yours
$this->email->to('xxxxx@austecservices.com.au, xxxx@yahoo.com');// change it to
$this->email->bcc('xxxxx@gmail.com');
$this->email->subject($company[0]->title.": ".$this->userSession->given_name." ".$this->userSession->surname." raised an ad-hoc request for ".$site_name);
$this->email->message($message);
if(!$this->email->send()) {
show_error($this->email->print_debugger());
}
有什么建议吗?
答案 0 :(得分:0)
请尝试以下代码:
$mail['fordetail'] = array(
'name'=> $name,
'email'=> $email,
'content'=>$content,
);
$txtEmail = $this->load->view('email',$mail,true);
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->from($this->config->item('team'));
$this->email->to($cusdata->email);
$this->email->subject($subject);
$this->email->message($txtEmail);
$this->email->send();