/    Sign up×
Community /Pin to ProfileBookmark

mail() and multiple recipients

Hi,
how do you use the mail() to send to multiple recipients,

you cant just use:
mail(‘[email protected], [email][email protected][/email]‘, subject, message);
thanks

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@mg8Nov 11.2003 — You can do a CC in a mail header.

[code=php]$header = "From: [email][email protected][/email]";
$header .= "CC: [email][email protected][/email]";
$header .= "CC: [email][email protected][/email]";


mailto ($email, $subject, $message, $headers)[/code]



I'm pretty sure that will work ?
Copy linkTweet thisAlerts:
@pyroNov 11.2003 — [i]Originally posted by damon2003 [/i]

[B]you cant just use:

mail('[email protected], [email protected]', subject, message);[/B]
[/QUOTE]
Yes, you can. It should have worked fine like that.
Copy linkTweet thisAlerts:
@damon2003authorNov 11.2003 — thanks,

yea your right it does work, just tried again with different address. Tthe first time I tried it one of the addresses was a hotmail address. The hotmail addresses dont seem to work for some reason
Copy linkTweet thisAlerts:
@pyroNov 11.2003 — Look in your spam folder. If you don't set any headers, odd's are real good that's where it would end up. ?
×

Success!

Help @damon2003 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.19,
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,
)...