/    Sign up×
Community /Pin to ProfileBookmark

Multiple e-mail addresses in php.mailer file

I was reading thread today in another forum and noticed an ASP file/code that enabled an e-mail form to be mailed to multipe addresses including CC and BCC.

I have wanted to have a form on my site using mailer.php to send e-mails to my partner for info. I now forward a copy to her but it would be much better if they came direct to her.

However after wasting time creating my files I discovered that my server does not action asp files.

Is it possible to achieve this using the mailer.php file??

If so, could someone please point me in the right direction. I know next to nothing about php having found the mailer php file and instructions through this form.

Cheers

Jack
The Magus

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@felgallMar 24.2007 — To supply multiple email addresses to the PHP mail function you put a comma between each address.

[email][email protected],[email protected],[email protected][/email]
Copy linkTweet thisAlerts:
@The_MagusauthorMar 24.2007 — Thank you Felgall

Your suggestion solves the problem but I wonder if there is any way of having the message sent as a CC or BCC addressee.

It's not a big problem but if possible it would be the icing on the cake.

Whoops - I just tried the suggestion and got the following instead of the normal "Thank you" page:

Warning: Cannot modify header information - headers already sent by (output started at /home/www/allabout/mailer.php:1) in /home/www/allabout/mailer.php on line 44

I'm not entirely sure but I think the second message was in fact sent but will not know until my partner checks her mail tomorrow.

The above warning would unsettle the viewer and give the impression that the message had not been sent.

Cheers

Jack

The Magus
Copy linkTweet thisAlerts:
@NogDogMar 24.2007 — Cc: and Bcc: addresses (as well as Reply-To: addresses) are handled via the "additional headers" parameter of the mail() function.
×

Success!

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