Results 1 to 2 of 2

Thread: PHP email copy

  1. #1
    Join Date
    Oct 2005
    Location
    UK, Hampshire
    Posts
    19

    PHP email copy

    Hi, i have this script and i would need a copy to be sent to the visitors email $youremail

    PHP Code:
    <?

        
    require "emailtemplate.php";
      
      function 
    SendMail($for ""$subject ""$text ""$email="")

     {

      
    // prekonvertovani do CZ podoby

      
    $text StrTr($text"\x8A\x8D\x8E\x9A\x9D\x9E",

      
    "\xA9\xAB\xAE\xB9\xBB\xBE");

      
    $headers "From: $email\nMIME-Version: 1.0\nContent-Type: text/html; charset=\"iso-8859-1\"\n";
      
      
    $headers .= "Cc: \"".$youremail."\"\n";
      
      
    $headers .= "X-Sender: <"$headers .= $email;  $headers .= ">\n";

      
    $headers .= "X-Mailer: PHP\n"// mailový klient

      
    $headers .= "X-Priority: 1\n"// Urgentní vzkaz!

      
    $headers .= "Return-Path: <"$headers .= $email$headers .= ">\n";  // Návratová cesta pro chyby

      
    if (!@Mail($for$subject$text$headers)) {return false;}

      return 
    true;

     }



        if (
    SendMail("info@empire-elements.co.uk""Order - Send from IP adress:    $REMOTE_ADDR"$mailbody"info@empire-elements.co.uk"))

            echo 
    "<br>Your order has been sent to MDFDesign.<br>";

        else

            echo 
    "<br>Your order has not been sent to MDFDesign - transfer failed.<br>";

    ?>

  2. #2
    Join Date
    Apr 2005
    Posts
    90
    Simply call sendmail again with the visitors email address instead of the companies e.g.

    SendMail($youremail, "Order - Send from IP adress: $REMOTE_ADDR", $mailbody, "info@empire-elements.co.uk")

Similar Threads

  1. PHP Email Form checkboxes
    By carly02 in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 22 Sep 2005, 07:21 AM

Posting Permissions

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