php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8113 there is a "!" and a linebreak in any mail that i send in text mode
Submitted: 2000-12-05 05:09 UTC Modified: 2000-12-05 06:34 UTC
From: christian at buyclever dot de Assigned:
Status: Closed Package: Mail related
PHP Version: 4.0.3pl1 OS: linux
Private report: No CVE-ID: None
 [2000-12-05 05:09 UTC] christian at buyclever dot de
--with-apcs --with-mcrypt --with-pdflib --with-mysql --enable-ftp --with-zlib

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-05 05:52 UTC] sniper@php.net
Please add a short example script into this report which
can be used to reproduce this.

--Jani
 [2000-12-05 05:59 UTC] christian at buyclever dot de
function create_order_productlist($productid, $number, $price, $description, $option_name1, $option1, $option_name2, $option2, $currency) {
	$file_pl = fopen(bc_TEMPLATES_TXT . "order_product_list.txt", "r");
	
	/* format auslesen */
	while (!feof($file_pl)) {
		$row = trim(fgets($file_pl, 1024)) . "\r";
		if (strstr($row, "[%option1_name%]")) {
			if (is_set($option_name1)) $message .= $row;
		} else {
			$message .= $row;
		}
	}
	
	/* produkt einsetzen */
	$message = str_replace("[%productid%]", $productid, $message);
	$message = str_replace("[%number%]", $number, $message);
	$message = str_replace("[%price%]", parse($price), $message);
	$message = str_replace("[%currency%]", $currency, $message);
	$message = str_replace("[%description%]", $description, $message);
	$message = str_replace("[%option1_name%]", $option_name1, $message);
	$message = str_replace("[%option1%]", $option1, $message);
	$message = str_replace("[%option2_name%]", $option_name2, $message);
	$message = str_replace("[%option2%]", $option2, $message);
	$message = str_replace("[%number_price%]", parse($number * $price), $message);
	
	fclose($file_pl);
	
	return $message;
}

$ordermail = create_order_mail($order_productlist, $sender, $userid, $orderid, $firstname, $lastname, $address, $zipcode, $city, $country, $SETTINGS_sendcosts, $total, $SETTINGS_currency, $SETTINGS_takecosts);

mail($email, "Subject", "$ordermail", "From: $sender\nContent-Type: text");
 [2000-12-05 06:34 UTC] sniper@php.net
'Content-Type: text' should be 'Content-Type: text/plain'

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 14:01:29 2024 UTC