dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: CC to sender

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Posts
    4

    CC to sender

    Hello Guys,

    Can some one help me on how to add a cc to my script

    <?
    $to = 'wilson@magega.com';

    $subject = 'Online Employees Time Cards';
    $message =

    I want to resend a copy of the form that my web user are submitting.

    Please....

  2. #2
    Join Date
    Jan 2006
    Location
    MN
    Posts
    440
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    // Additional headers
    $headers .= 'From: Me <me@example.com>' . "\r\n";
    $headers .= 'Cc: me@example.com' . "\r\n";

  3. #3
    Join Date
    Oct 2012
    Posts
    4

    Cc sender

    Hello, I try the code you gave me and didn't work, can you please tell me why?

    <?
    $to = 'wilson@magega.com';
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    // Additional headers
    $headers .= 'From: Me <me@example.com>' . "\r\n";
    $headers .= 'Cc: me@example.com' . "\r\n";
    $subject = 'Online Employees Time Cards';
    $message =
    ' Date:
    ' . $_REQUEST['date'] . "\n\n" .

    ' First Name:
    ' . $_REQUEST['name'] . "\n\n" .

    ' Subject:
    ' . $_REQUEST['subject'] ."\n\n" .

    ' Comments:
    ' . $_REQUEST['comments'] ;
    $email = $_REQUEST['email'];
    $headers = 'From: ' . $email . "\r\n" .
    'Reply-To: ' . $email . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

    mail ($to, $subject, $message, $headers);
    header("Location:thankyou.php");
    ?>

  4. #4
    Join Date
    Jan 2006
    Location
    MN
    Posts
    440
    Does the mail go out but not to the sender? Or does mail not go out at all?

  5. #5
    Join Date
    Oct 2012
    Posts
    4
    Email is not going to sender but I dont know if I have to replace: this two lines with some thing 'From: Me <me@example.com>' . "\r\n";
    $headers .= 'Cc: me@example.com' . "\r\n";

    where it said Cc: me@example.com do I keek like that...?

  6. #6
    Join Date
    Jan 2006
    Location
    MN
    Posts
    440
    You could use $headers .= 'Cc: Me <me@example.com>' . "\r\n";

    Of course you need to use an actual email address.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles