Jump to content

Recommended Posts

Hi

 

I have a website that has feedback form, customers enter details and a php script sends the information to my email address. I would like this changing so that an automated response is sent to the customer to let them know we have received the information and will contact them shortly. I would like this email to contain the information we are sent so they can see if it contained any errors.

 

The current PHP script that I am using is shown below:

 

 

$name = $_REQUEST['name'] ;

$address = $_REQUEST['address'] ;

$postcode = $_REQUEST['postcode'] ;

$telephone = $_REQUEST['telephone'] ;

$email = $_REQUEST['email'] ;

$brand = $_REQUEST['brand'] ;

$productcode = $_REQUEST['productcode'] ;

$voltage = $_REQUEST['voltage'] ;

$quantity = $_REQUEST['quantity'] ;

$pricequoted = $_REQUEST['pricequoted'] ;

$info = $_REQUEST['info'] ;

 

mail( "[email ADDRESS HERE", "Would like to Purchase",

"Name: $name\n Address: $address\n Post Code: $postcode\n Telephone: $telephone\n Email: $email\n Brand: $brand\n Product Code: $productcode\n Voltage: $voltage\n Quantity: $quantity\n Price Quoted: $pricequoted\n Info: $info",

"From: Website Order" );

header( "Location: www.qualitytoolsltd.co.uk/paymentthankyou.html" );

?>

 

 

I would like the automatic email response to include my company’s logo in the email; the logo is attached with this project post.

 

Also i have a text that i want to sent it to mail.

 

Please please let me know what changes should i include in my script to send the automated response!! Am really stuck in here.

 

Any help is greatly appreciated!!

 

Thanks in advance

Regards

Jyothi

Would the script look some thing like this :??

 

 

$name = $_REQUEST['name'] ;

$address = $_REQUEST['address'] ;

$postcode = $_REQUEST['postcode'] ;

$telephone = $_REQUEST['telephone'] ;

$email = $_REQUEST['email'] ;

$brand = $_REQUEST['brand'] ;

$productcode = $_REQUEST['productcode'] ;

$voltage = $_REQUEST['voltage'] ;

$quantity = $_REQUEST['quantity'] ;

$pricequoted = $_REQUEST['pricequoted'] ;

$info = $_REQUEST['info'] ;

 

mail( "[email ADDRESS of the website owner here to send mail regarding purchase orders made by customers ", "Would like to Purchase",

"Name: $name\n Address: $address\n Post Code: $postcode\n Telephone: $telephone\n Email: $email\n Brand: $brand\n Product Code: $productcode\n Voltage: $voltage\n Quantity: $quantity\n Price Quoted: $pricequoted\n Info: $info",

"From: Website Order" );

header( "Location: www.xxxxxxxxxpaymentthankyou.html" );

?>

 

mail( "[email ADDRESS of the website owner here", "<img src="image_location" />", "msg.body" );

?>

 

mail( "[email ADDRESS of customers ", "<img src="image_location" />", "msg.body");

?>

 

Please look at it and let me know. Am new to php and trying to gain knowledge and expertise through work.

 

All the help is appreciated.

 

if(mail( "[email ADDRESS of the website owner here to send mail regarding purchase orders made by customers ", "Would like to Purchase",

"Name: $name\n Address: $address\n Post Code: $postcode\n Telephone: $telephone\n Email: $email\n Brand: $brand\n Product Code: $productcode\n Voltage: $voltage\n Quantity: $quantity\n Price Quoted: $pricequoted\n Info: $info",

"From: Website Order" )){

 

                  // Send mail to userl

 

              mail('cust_email','sub' ..........);

}

header( "Location: www.xxxxxxxxxpaymentthankyou.html" )){

 

And where would i use the mail php function to send the mail to owner (same mail sent to customer, to verify if all the contents sent to customer are true)? I guess, i want to use the mail function just below the mail function used to send mail to customer?

In the mail () php function, i see the 'message' part takes just 70 characters. Is it possible to sent message more than that limit. Actually in the message part am looking for sending a long message (about 2-3 paragraphs)!!

 

Can i use the script like this:

 

<?php

 

//The Message

$message = "<p> Thank You for wishing to make a purchase from us. Our system has received your Order Request and it has been passed on to a member of our team. </p> <br>

 

<p>If you have placed your order request during office hours (Monday to Friday, 9am to 5pm) then a member of our team shall be in contact with you shortly. If you have placed your Order Request outside of office hours then we shall contact you during the Next working day to process your order over the phone. Please be aware that if you did decide to place an order with another company now, then it is more than likely that they would not process the order until the next working day either.</p><br>

 

<p>You can see below a copy of the information that has been sent to our team below:</p>

$name = $_REQUEST['name'] ;

$address = $_REQUEST['address'] ;

$postcode = $_REQUEST['postcode'] ;

$telephone = $_REQUEST['telephone'] ;

$email = $_REQUEST['email'] ;

$brand = $_REQUEST['brand'] ;

$productcode = $_REQUEST['productcode'] ;

$voltage = $_REQUEST['voltage'] ;

$quantity = $_REQUEST['quantity'] ;

$pricequoted = $_REQUEST['pricequoted'] ;

$info = $_REQUEST['info'] ;

 

<p>If any of the information is incorrect, or if you would like us to contact you at a convenient time, then please let us know by sending an email to with “ORDER CHANGE” in the subject title.</p> <br>

 

<p>Thank you very much for contacting us, we will speak to you soon.</p>

Kind Regards

 

xxxxx " ;

 

mail ('customer@email.com,owner@email.com','sub', $message, 'header');

?>

 

 

Sorry to confuse at the last moment. My point here is , i want to send a long message in the email. How can i insert that! The message part might not have the entire syntax correct, i might have missed some of the html tags, but writted it to give the idea of what am trying to do.

 

Please help

You can send like this

 

<?php
// multiple recipients
$to  = 'aidan@example.com' . ', '; // note the comma
$to .= 'wez@example.com';

// subject
$subject = 'Birthday Reminders for August';

// message
$message = '
<html>
<head>
 <title>Birthday Reminders for August</title>
</head>
<body>
 <p>Here are the birthdays upcoming in August!</p>
 <table>
   <tr>
     <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
   </tr>
   <tr>
     <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
   </tr>
   <tr>
     <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
   </tr>
 </table>
</body>
</html>
';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";

// Mail it
mail($to, $subject, $message, $headers);

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.