PHP SMTP BCC without going through

Recipients named in BCC / CC (in headers) are not accepted. I found a couple of posts with similar questions, no answers ...

The code below is the question: "Have any of you had similar problems?"

require_once "Mail.php";

$host = "mail.mailserver.com";
$username = "notification@yourhost.com";
$password = "getyourownpassword";

$headers = array ('From' => "User Name <$username>",
                  'To' => $to_,
                  'Cc' => 'Patty <patty@gmail.com>',
                  'Subject' => $subj_,
                  'Content-type' => 'text/html');

$smtp = Mail::factory('smtp',
                      array ('host' => $host,
                             'auth' => true,
                             'username' => $username,
                             'password' => $password));

$mail = $smtp->send($to_, $headers, $mail_msg);
+3
source share
1 answer

, PEAR. , , , , , , , CC, CC'd, . BCC recpients, .

+6

Source: https://habr.com/ru/post/1777789/


All Articles