Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6253257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:57:18+00:00 2026-05-24T13:57:18+00:00

Even this must have been be asked many times, I will ask again since

  • 0

Even this must have been be asked many times, I will ask again since I cannot get it to work.

I am using php mail($to, $subject, $message, "From: $mysite<$myemail>\nX-Mailer:PHP/" .phpversion()); to send email to a single recipient.

Now I need to sent it to more than one recipients. I know that normaly I could do:

$to = "emailA@here.com,emailB@there.com";

But I need the one of the recipients to be the user that fills in the form e.g.:

//get all form details
$email = $_POST['email'];

$to = "$email,emailB@there.com";

The above ($to) I don’t know if it is correct or not but is not working for me…

If I leave only the $to = "$email"; it gets send to $email (meaning that my rest of the code is ok).

Any suggestion on what is or may be wrong here?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:57:20+00:00Added an answer on May 24, 2026 at 1:57 pm

    Add a CC to your header.

    $header ="From: $mysite<$myemail>" . PHP_EOL;
    $header .= 'CC: emailB@there.com' . PHP_EOL;
    //Rest of headers here
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This problem must have been solved a million times, but Google has not been
I know this question must have been covered endless of times, but I've searched
I'm pretty sure this must have been here already, but I didn't find much
I must admin this is kind of funny even though I think I understand
I am unsure if this is even possible, but I thought I would ask.
I'm not sure if this is even possible but here goes: Currently I have
This question has been asked before, see: jQuery select only tr/td in main table,
I know that similar questions have been asked all over the place, but I'm
I have been asked to program a routine to decide the number of possible
I know something must have been changed but my code seems to have broken

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.