PHP mail関数で複数の宛先にメール
2010/09/17
http://okwave.jp/qa3592129.html
//BCC宛のサンプル
$to = ‘user01@domain.com’;
$subject = ‘Bcc Test’;
$body = ‘This is a test’;
$headers = ‘Bcc: user02@domain.com’;
$option = ”;
$to = ‘user01@domain.com’;
$subject = ‘Bcc Test’;
$body = ‘This is a test’;
$headers = ‘Bcc: user02@domain.com’;
$option = ”;
mail($to, $subject, $body, $headers, $option);
//Toを複数バージョンのサンプル
$to = ‘user01@domain.com,user02@domain.com’;//半角カンマで区切ります
$subject = ‘To Test’;
$body = ‘This is a test’;
$headers = ”;
$option = ”;
mail($to, $subject, $body, $headers, $option);
Bccも同じようにカンマで区切って、複数指定できます