What I thought when I was using the “to” method is that it will send out an email with only a single address in the “to” field. But it turns out it lists out all email address the email were sent to.
Here’s sample code I made close to what I actually did. Which the only important thing to note is how I used the ”to” method. Is that a proper usage? Or should I use a different approach to achieve what I was expecting?
$emails = [‘test@example.com’,’test2@example.com’];
//loads wiremail module and add subject body etc.
foreach($emails as $email){
$wm->to($email);
}
$wm->send();
I did see in the sendgrid docs to use personalization, but I don’t think you’re using it in this module, are you?