phpのメール機能に問題があります。
これはコードです:
public function send_email($emailInfo)
{
// email fields: to, from, subject, and so on
$to = $emailInfo['toEmail'];
$from = $emailInfo['fromEmail'];
$subject = $emailInfo['subject'];
$message = $emailInfo['message'];
//$message = $this->base_directory.'/application/views/emailtemplates/ticketresponse'($emailInfo['viewVars'], true);
$headers = 'From: '.$emailInfo['fromEmail'].' <'.$emailInfo['fromEmail'].'>';
// boundary
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
// headers for attachment
$headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\"";
if (is_array($emailInfo['cc']))
{
$headers .= 'Cc: ';
foreach ($emailInfo['cc'] as $cc)
{
$headers .= $cc. ",";
}
$headers = substr($headers, 0, -1);
$headers .= "\r\n";
}
// multipart boundary
$message = "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n";
$message .= "--{$mime_boundary}\n";
// send
@mail($to, $subject, $message, $headers, '-f'.$emailInfo['fromEmail']);
}
この関数は実際に電子メールを送信し、cc受信者の配列は実際に入力されますが、これらの受信者は電子メールを受信しません。