I use sendgrid with php, I used both options - the client library and the curl parameter. So far, I could send messages directly using the addTo option without any problems. But when I try to add the Cc or Bcc options, the email is still sent, but the copies are not delivered. Are there any known issues with php version? In another project, the java library works very well.
Here is a simple piece of code I'm trying to do.
<?php require ('sendgrid/sendgrid-php.php'); $sendgrid = new SendGrid('user', 'pwd'); $mail = new SendGrid\Email(); $mail ->addTo(" mymail@gmail.com "); $mail ->addCc(" other@otherserver.com "); $mail ->setFrom(" sender@server.com "); $mail ->setSubject("TEST"); $mail->setHtml("<h1>Example</h1>"); $sendgrid->send($mail); ?>
source share