平成30/ 2018-10-24 06:43
PEAR/ Mail.php/ GmailでBCCが表示されてしまう

以下のように、
$headersに、Bccを設定しなければいい。
---------
//The main recipient
$to = "test@test.com";

//Bcc recipients
$bcc = "bcc@test.com";

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));

//We append the bcc addresses as comma seperated values to the send method
$mail = $smtp->send($to . "," . $bcc, $headers, $body);


|
| Thanks.
|----------
pear mail function bcc won't send
http://gotoanswer.stanford.edu/?q=pear%20mail%20function%20bcc%20won%27t%20send