/    Sign up×
Community /Pin to ProfileBookmark

Send email to multiple BCC

I am writing a script to read a DB and put emails into a BCC, but I do not recieve any emails. Can someone piont out my mistake?

My code …

$MailBCCAddress = “Bcc: “;

//Do database select that works ok
while ($result->fetchInto($row)) {
$dbId = $row[0];
$dbName = $row[1];
$dbEmail = $row[2];
$dbSub = $row[3];
$dbVisit = $row[4];
$MailBCCAddress .= $dbEmail;}

$Header = “MIME-Version: 1.0n”;
$Header .= “Content-type: text/html; charset=iso-8859-1n”;
$Header .= “From: zzz.com<$MailFromAddress>n”;
$Header .= “Cc: [email][email protected][/email]n”;
$Header .= “$MailBCCAddressn”;

mail( “$MailToAddress”, “$MailSubject”, “$Message”, “$Header”);

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@sciguyryanMay 29.2004 — I'm not shure but, as far as I can remember you seperate them by a comma (,)
Copy linkTweet thisAlerts:
@arthurauthorMay 29.2004 — Thanks, I'll add a comma. 10 minutes after I tested the script, all of my tests were emailed. Do you know why it takes so long for the emails to show up?
×

Success!

Help @arthur spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...