Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2009
    Thanked 0 Times in 0 Posts

    PHP Mail Function to send html mail and attachments

    I generate my feedback scripts using Php Form Wizard which i recently purchased. I have however ran into a fix with a form i need to use an auto responder with that will not only send html email but will also attach a logo to send with the mail

    The generated code for the feedback and auto response is as follows


    // Receiving variables
    @$pfw_ip= $_SERVER['REMOTE_ADDR'];
    @$VTIGROUP = addslashes($_POST['VTI-GROUP']);
    @$T1 = addslashes($_POST['T1']);
    @$T2 = addslashes($_POST['T2']);
    @$T3 = addslashes($_POST['T3']);
    @$T4 = addslashes($_POST['T4']);
    @$T5 = addslashes($_POST['T5']);
    @$T6 = addslashes($_POST['T6']);
    @$T7 = addslashes($_POST['T7']);
    @$T8 = addslashes($_POST['T8']);
    @$T9 = addslashes($_POST['T9']);
    @$T10 = addslashes($_POST['T10']);
    @$D1 = addslashes($_POST['D1']);
    @$T11 = addslashes($_POST['T11']);
    @$T12 = addslashes($_POST['T12']);
    @$S1 = addslashes($_POST['S1']);

    // Validation
    if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $T7))
    header("Location: error.html");

    //Sending Email to form owner
    $pfw_header = "From: $T7\n"
    . "Reply-To: $T7\n";
    $pfw_subject = "Feedback Form from IGODYE's website";
    $pfw_email_to = "infoseptemberatts@yahoo.com";
    $pfw_message = "Visitor's IP: $pfw_ip\n"
    . "T1: $T1\n"
    . "T2: $T2\n"
    . "T3: $T3\n"
    . "T4: $T4\n"
    . "T5: $T5\n"
    . "T6: $T6\n"
    . "T7: $T7\n"
    . "T8: $T8\n"
    . "T9: $T9\n"
    . "T10: $T10\n"
    . "D1: $D1\n"
    . "T11: $T11\n"
    . "T12: $T12\n"
    . "S1: $S1\n";
    @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

    //Sending auto respond Email to visitor
    $pfw_header = "From: info@\n"
    . "Reply-To: info@\n";
    $pfw_subject = " Your Booking Request has been Recieved";
    $pfw_email_to = "$T7";
    $pfw_message = "Dear $T1,\n"
    . "We have recieved your request for the booking of $D1. A Customer care representative will be looking into your request and will be getting across to you shortly with further information/instructions.\n"
    . "Thank you for using US.\n"
    . "HAI";
    @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;

    header("Location: thankyou.html");


    Help will be appreciated please...
    Thank you

  2. #2
    Regular Coder funnymoney's Avatar
    Join Date
    Aug 2007
    Thanked 24 Times in 24 Posts
    can you make this thread a sticky?


Posting Permissions

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