Jump to content

PHP Mail Function to send html mail and attachments using Php Form Wizard


ayomitundea

Recommended Posts

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

 

<?php

 

 

// 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");

exit;

}

 

//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"

. "VTIGROUP: $VTIGROUP\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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.