I am able to send email to one email id by defining the id in the mailer, but i am not able to understand how to send to multiple recepients when an user types “mssage and email id’s” in a form. Ex – I am showing a form with two text areas – one for email id’s and one for custom message. So when they click send, i want to take the email id’s from that text area and send that message to those ids. I am yet to figure out how to comma/space seperate the emailds but will try it in google search.
thanks
after doing some search, I came with this answer to send multiple address seperated by semicolon(for some reason my try with comma in this code failed, but i am fine with semicolon).
If in case if anyone is looking for JS validation to check the id’s entered
As i collected the email id’s separated by semicolon, i had to replace ; with ,
$email id – collected from the form
so after doing the above replacement, i just use the normal “to” in the mailer to send to multiple recipients.
hope this helps and it’s clear. I can explain if anyone needs more clarification. thanks for all your help.