Jump to content

Can I Insert a Banner Image into here?


roldahayes

Recommended Posts

Hi, the below code generates a confirmation when someone orders something and emails it to them.

 

My question is, how would I best go about putting an advertising banner at the bottom of their email which is linked somewhere?

 

Cheers,

 

<?php

//get confirmation or customerID etc
$shopperID = stripslashes($_POST['Shopper_ID']);

// set up mail details
$mail_to = stripslashes($_POST['Customer_Email']);
$mail_from = "********";
$mail_subject = "Order Confirmation";
$mail_headers = "FROM: $mail_from\r\n";
//added additional recipient
$mail_body = "Dear Customer,\n\nYour order has been sent to us successfully and you should have printed the order confirmation page. If you do not have a copy, please make a note of the following ShopperID :- ".$shopperID." You may refer to this if you have any queries.\n\nWe will contact you to confirm your order.".
"\n\nThank you";

//create mail footer message
$mail_footer = "\n\nFooter Message Here!";

//concatinate mail_body and mail_footer
$mail_body = $mail_body . $mail_footer;
// send mail
	if (mail($mail_to, $mail_subject, $mail_body, $mail_headers)) {
		//echo ("<p>Message sent</p>");
	} else {
		echo ("<p>Error On Sending Mail</p>");
	}

?>

Link to comment
Share on other sites

Ok, i read the link and thought i'd got it sussed... but still not sending...

 

heres what I have so far with the $headers included

 

<?php

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

//get confirmation or customerID etc
$shopperID = stripslashes($_POST['Shopper_ID']);

// set up mail details
$mail_to = stripslashes($_POST['Customer_Email']);
$mail_from = "info@******.co.uk";
$mail_subject = "Order Confirmation";
$mail_headers = "FROM: $mail_from\r\n";
//added additional recipient
$mail_body = "Dear Customer,\n\nYour order has been sent to us successfully and you should have printed the order confirmation page. If you do not have a copy, please make a note of the following ShopperID :- ".$shopperID." You may refer to this if you have any queries.\n\nWe will contact you to confirm your order.".
"\n\nThank you for buying through us";

//create mail footer message
$mail_footer = "<a href=\"http://www.quizbay.com\"><img src=\"quizbay.jpg\" alt=\"\"></a>";





//concatinate mail_body and mail_footer
$mail_body = $mail_body . $mail_footer;
// send mail
	if (mail($mail_to, $mail_subject, $mail_body, $mail_headers)) {
		//echo ("<p>Message sent</p>");
	} else {
		echo ("<p>Error On Sending Mail</p>");
	}

?>

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.