Forum Moderators: coopster

Message Too Old, No Replies

multi emails single password

         

Gilead

6:23 pm on Dec 21, 2011 (gmt 0)

10+ Year Member



Part of my app has the lost password page. In this case, they enter their login and it is sent. If they do not remember it, they go to the retrieve login, when they enter their email. If there are multiple emails, the client wants to have it sent to all. I can send it to one, but not sure how to build the query or set up the bcc for the mail.

Thanks!

Dinkar

10:25 pm on Dec 21, 2011 (gmt 0)

10+ Year Member



Try this:

mail($to, $subj, $body, "From:$from_email\r\nBcc:$bcc_email");

Gilead

5:01 pm on Dec 22, 2011 (gmt 0)

10+ Year Member



So I'd need a loop to run through the emails and fill in a $bcc_email array, then send them out?

rocknbil

5:23 pm on Dec 22, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Stow the emails in an array (list) and put your mail() call inside the loop.

foreach ($emails as $em) {
// of course there's more code here
mail($em,$subj,$msg,$headers);
}