sending am email

Discussion in 'PHP' started by hut, Nov 12, 2009.

  1. #1
    i have a problem of sending am emial to an organisation and also a mail will be sent as an acknowledgment to the person who send the mail.

    please if possible send me code as soon as possible.
     
    hut, Nov 12, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    what exactly do u mean ?? a form is what u want ?
     
    Bohra, Nov 12, 2009 IP
  3. hut

    hut Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hi !!!!
    thanx for viewing my problem.
    I want to send an email as Cc and Bcc in php.
    i have a code as below.
    please send me the code in which the email will be send as Cc and Bcc

    <?php
    }


    // If there were no errors, send an email to the organisation staff.
    else {
    $message = "This message has been generated by the organisation staff.'Contact Us' page. Contact details for the sender are given below.\r\n\r\n";
    $message .= "Name: $name\r\n\r\n";
    $message .= "Address:\r\n";
    $message .= "$number $street\r\n";
    $message .= "$suburb, $state\r\n";
    $message .= "$postcode\r\n\r\n";
    $message .= "Phone #: $phone\r\n";
    $message .= "Email: $email\r\n\r\n";
    $message .= "Comments:\r\n";
    $message .= "$comments";

    $headers = "Return-Path: <$email>\r\n";
    // This line uses a friendly name 'No Reply' and causes errors $headers .= "From: No Reply <webmaster@hvc.org.au>\r\n";
    // $headers .= "From: \r\n"; // this line doesn't use a 'friendly name' and seems to work
    $headers .= "From: <$email>\r\n"; //added by PY 18-10-07 so that emails come from the address supplied
    $headers .= "User-Agent: HVC contact form\r\n";

    $subject = "HVC Contact form";

    // The following line is where the prob occurs. info@hvc is an address for a public folder, and it can't seem to send to that, but can send to an Active Directory account
    // Update 18-10-07 re-enabled the following line. Now it works - go figure!!
    if ($trap == ''){
    if (mail("info@hvc.org.au", "$subject", "$message", "$headers")){
    echo '<h1>Thank You</h1>';
    echo '<p>The information you entered has been forwarded to the staff at HVC.</p>';
    echo '<p>&nbsp;</p>';
    echo '<p>&nbsp;</p>';
    }
    }
    }
    ?>

    please send me the code as soon as possible.
     
    hut, Nov 15, 2009 IP
  4. hut

    hut Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    edited code is send
     
    hut, Nov 15, 2009 IP