Mail to more then one recipient?
When processing an email form, sometimes I want to send the email to two
recipients: e.g. I am working as a volunteer for a vicary and the staff is
not so familiar with the whole email stuff.
Usually I just call the mail function two times so:
mail(somebody@somewhere.com, "Reaction from your site" , $theMessage);
mail(somebodyelse@somewhereelse.com, "Reaction from your site" ,
$theMessage);
If there would be more recipients of course I could create an array called
$theRecipients and walk through the array but I wonder if there are other,
more practical alternatives. But mostly there are just 2 recipients (the
company or organisation for which I made the site, and myself) so I also
considered to write a small function mailTwice($theRecipient1,
$theRecipient2, $subject, $text).
Besides, I couldn't find any options on the web for the bcc and cc fields.
Maybe I just entered the wrong search entries in Google, so I apologise if
there is some info on the web and of course links to the appropiate sites
are also welcome.
Thx
Martien van Wanrooij
|