Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
Correo PHP agregando BCC

Tengo un formulario que completa un correo PHP para enviar a nuestros clientes, quiero BCC la mayoría de los clientes debido a la privacidad. Tengo el siguiente código

 $to = "******@e-track.co.za"; //To recipients $email_from = '*****@etrackbureau.co.za';//<== update the email address $email_subject = "New Overdue Loaded"; $email_body = "A new High Risk Client has been loaded by $name $company.\n". "\n Client Name: $driver_name $driver_surname\n \n Client ID or Passport Number: $driver_id\n \n Nationality: $driver_nationality\n \n Reason for Loading Client: $type\n \n Notes: $notes\n ". $headers = "From: $email_from \r\n"; $headers = "Bcc: ******@e-track.co.za;*****@e-track.co.za;******@e-track.co.za\r\n"; //$headers = "Reply-To: $visitor_email \r\n"; //Send the email! mail($to,$email_subject,$email_body,$headers);

He agregado el BCC como encabezados de $, pero una vez que lo agrego, no envía correos electrónicos cuando lo elimino, recibo el correo al destinatario de $to.

También probé el espacio entre los correos BCC. He reemplazado los nombres de correo con **** por razones de spam

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Debes concatenar $headers

Ejemplo :

 $headers = "From: *****@etrackbureau.co.za\r\nX-Mailer: php\r\n"; $headers .= "MIME-Version: 1.0\r\n"; #Define MIME Version $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; #Set content type $headers .= "Bcc: $EmailListHere\r\n"; #Your BCC Mail List
about 4 years ago · Santiago Trujillo Report

0

// Cabeceras adicionales

 $headers[] = 'To: Mary <mary@example.com>, Kelly <kelly@example.com>'; $headers[] = 'From: Birthday Reminder <birthday@example.com>'; $headers[] = 'Cc: birthdayarchive@example.com'; $headers[] = 'Bcc: birthdaycheck@example.com';

// Enviarlo por correo

 mail($to, $subject, $message, implode("\r\n", $headers));

Enlace

about 4 years ago · Santiago Trujillo Report

0

Debe concatenar las cadenas de encabezado. Reemplace 'header =' por 'header .=' en su código

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!