Dwi Hyuga

Dwi Hyuga

  • NA
  • 116
  • 20.4k

sending multiple recipients email using smtp on PHP

Nov 23 2016 4:01 AM
I am really need your help,
I am trying sending multiple recipients email using smtp email on php, can you help me please? check my code out
  1. if($_SERVER["REQUEST_METHOD"] == "GET"):  
  2.     $to = "[email protected][email protected]";  
  3.     $cc = "[email protected]";  
  4.     $from = "[email protected]";  
  5.     $subject = "Daftar PR Karet";  
  6.     $body = "  
  7. Berikut data PR karet pada tanggal $now :  
  8.   
  9. $y  
  10.   
  11. Note : pesan ini digenerate oleh computer.  
  12. Terima Kasih,  
  13.             ";  
  14.     $SMTPMail = new SMTPClient ($SmtpServer$SmtpPort$SmtpUser$SmtpPass$from$to$cc$subject$body);  
  15.     $SMTPChat = $SMTPMail->SendMail();  
  16. endif;  
but it wouldn't send, it'll send if I remove the secondary $to email, instead... 

Answers (1)