Obay
Obay

Reputation: 3205

Sending email to multiple recipients but only one will appear in the TO field

Is it possible to send an email to multiple recipients, but on the receiving end, the recipient will only see his/her email address? If so how do I do this and could you point me to some references?

I know this can be done via a loop that sends to each recipient separately. But then I'll have to consider other things as well, such as 1) server's settings: number of emails allowed to be sent per hour 2) server's settings: number of seconds interval between sending emails 3) if i add a few seconds interval (for #2) between emails, id have to worry about maximum execution time per script, because my email sending script might take minutes, if the number of recipients is large

I also know I can do a cron job for this, but was just wondering if there was a way, really, to do what I outlined in the first paragraph :)

Thanks

Upvotes: 1

Views: 2467

Answers (3)

SLaks
SLaks

Reputation: 887305

You need to send a separate email to each recipient using a loop.

Upvotes: 2

hsz
hsz

Reputation: 152206

Example #4 http://php.net/manual/en/function.mail.php (BCC header). Add emails with coma delimiters.

Upvotes: 0

matei
matei

Reputation: 8685

just use the additional headers to add recipients to BCC (check out the php mail function documentation)

Upvotes: 0

Related Questions