ksuresh
02-03-2003, 02:30 AM
I can't seem to send too many lines of text between <p> and </p> tags or between <div> and </div> tags.This is the code for the entire page:
<html>
<head>
<style>
<!--
-->
</style>
<body>
<?php
$recipent="me@mydomain.com";
$subject="Test message.";
$message='
<html>
<head>
<style>
<!--
-->
</style>
<body background="some value" text=".." link="..." vlink="...">
<span style="position:absolute;left:20px;top:20px>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<p>
Some text here for 7-8 lines with URLs mentioned
</p>
</td>
</tr>
</table>
</span>
</body>
</html>
';
$headers="MIME-Version:1.0\n";
$headers .="Content-type:text/html;charset=iso-8859-1\n";
$headers .="From: Someone<someone@somename.com>\n";
$yes=mail($recipent,$subject,$message,$headers);
if($yes) {
echo "Mail was sent.";
}else {
echo "Sorry!The mail could not be sent this time.";
}
?>
</body>
</html>
Problem-PHP doesn't parse if the orange text area in the code is more than 2 lines.I then have to split up the text there into blocks of 1-2 lines each between <p> and </p> or <div> and </div> tags and the mail gets sent.The <br> tag simply doesn't work either if the text is too voluminous for one parse stretch.
I read at this page (http://www.php.net/manual/en/function.mail.php) that,"RFC 821 prohibits lines longer than 998 bytes, and requires that all servers be able to accept 998-byte lines. In practice, users sometimes send longer lines....So don't forget to do a "\n" at least every 998 bytes in your $message".This is an observation posted by an enthusiast there.
I tried following these directions and added \n after each line and,incase I was in error,tried adding "\n" after each line,but to no avail.
So,how do I get PHP to parse multiple lines in paras and multiple paras too for sendin HTML emails with the mail( ) function?
Pl assist
<html>
<head>
<style>
<!--
-->
</style>
<body>
<?php
$recipent="me@mydomain.com";
$subject="Test message.";
$message='
<html>
<head>
<style>
<!--
-->
</style>
<body background="some value" text=".." link="..." vlink="...">
<span style="position:absolute;left:20px;top:20px>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<p>
Some text here for 7-8 lines with URLs mentioned
</p>
</td>
</tr>
</table>
</span>
</body>
</html>
';
$headers="MIME-Version:1.0\n";
$headers .="Content-type:text/html;charset=iso-8859-1\n";
$headers .="From: Someone<someone@somename.com>\n";
$yes=mail($recipent,$subject,$message,$headers);
if($yes) {
echo "Mail was sent.";
}else {
echo "Sorry!The mail could not be sent this time.";
}
?>
</body>
</html>
Problem-PHP doesn't parse if the orange text area in the code is more than 2 lines.I then have to split up the text there into blocks of 1-2 lines each between <p> and </p> or <div> and </div> tags and the mail gets sent.The <br> tag simply doesn't work either if the text is too voluminous for one parse stretch.
I read at this page (http://www.php.net/manual/en/function.mail.php) that,"RFC 821 prohibits lines longer than 998 bytes, and requires that all servers be able to accept 998-byte lines. In practice, users sometimes send longer lines....So don't forget to do a "\n" at least every 998 bytes in your $message".This is an observation posted by an enthusiast there.
I tried following these directions and added \n after each line and,incase I was in error,tried adding "\n" after each line,but to no avail.
So,how do I get PHP to parse multiple lines in paras and multiple paras too for sendin HTML emails with the mail( ) function?
Pl assist