homepage Welcome to WebmasterWorld Guest from 54.197.65.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
multi emails single password
Gilead



 
Msg#: 4400230 posted 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.

Thanks!

 

Dinkar

10+ Year Member



 
Msg#: 4400230 posted 10:25 pm on Dec 21, 2011 (gmt 0)

Try this:

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

Gilead



 
Msg#: 4400230 posted 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?

rocknbil

WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4400230 posted 5:23 pm on Dec 22, 2011 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved