Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

multi emails single password



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

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.



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");


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

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


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

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 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

Featured Threads

Hot Threads This Week

Hot Threads This Month