Page 1 of 2

Outputting to Email in HTML format

Posted: Fri Jul 15, 2005 12:40 pm
by keress
I'm outputting a form to an email. I want it to output in HTML format. What it's doing presently is outputting the code itself, rather than what a browser would interpret the code to be. How can I fix this?

Posted: Fri Jul 15, 2005 12:47 pm
by Burrito
you need to create a header in the email to indicate that it's sending html.

search this forum for html email and header, you're bound to find what you're looking for.

Posted: Fri Jul 15, 2005 1:58 pm
by s.dot
while burrito will make you search, I'll post a code :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
ode :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.cient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $emaiject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charsom";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
make you search, I'll post a code :lol:

Code: Select all

$recipient = &quote;email@address.com&quote;;
$subject = &quote;Email subject&quote;;
$email_body = &quote;Body of email&quote;;
$additional_headers = &quote;From: you@yourdomain.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
mail($recipient, $subj make you search, I'll post a code

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
pient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
l@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = &quote;From: you@yourdomain.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
te;Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $addiharset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
rch, I'll post a code :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
e;From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headersp;quote;;
mail($recipient, $subject, $email_body, $additional_headers);
mail";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
make you search, I'll post a code :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
dy, $additional_headers);
code :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subjil_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
a code :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
tional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
nal_headers);
/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
;email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
h, I'll post a code :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
te;;
mail($recipient, $subject, $email_body, $additional_headers);
make you search, I'll post a code :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail(ody of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_heade1]
$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
[/php;;
$email_body = "Body of email&quote;;
$additional_headers = &quote;From: you@yourdomain.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);
make you search, I'll post a code :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
mail subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);
il($recipient, $subject, $email_body, $additional_headers);
ote;;
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);
make you search, I'll post a code :lol:

Code: Select all

$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_h
$recipient = "email@address.com";
$subject = "Email subject";
$email_body = "Body of email";
$additional_headers = "From: you@yourdomain.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);

Posted: Fri Jul 15, 2005 2:00 pm
by Burrito
guess I've gotten a little bit lazy in my old age.

/me will do better next time :?

...

Posted: Fri Jul 15, 2005 2:07 pm
by s.dot
Reasons you did not post code and i did
  • 1. I am 20, no old age
    2. I am bored
    3. You realize the search function is a valuable tool
    4. You've probably answered this question a thousand times
    5. I'm sure there's more
:lol:

Posted: Fri Jul 15, 2005 2:48 pm
by timvw
Well, and after that there is always http://phpmailer.sf.net... It's more or less the standard for mailing ;)

Posted: Fri Jul 15, 2005 2:56 pm
by onion2k

Code: Select all

$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.e;Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.hat \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.29dec0]
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n&quote;;
I'd check that \r\n if I were you. Som$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead./php]
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.t-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead. it. Use \n instead.eaders .="Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.instead.$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.ote;Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead. really don't like it. Use \n instead.quote;Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.e \n instead.te;;
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.ders .="Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead. Use \n instead.t/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n insteadr agents really don't like it. Use \n instead.$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.ally don't like it. Use \n instead.you. Some mail transfer agents really don't like it. Use \n instead.sfer agents really don't like it. Use \n instead.$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
I'd check that \r\n if I were you. Some mail transfer agents really don't like it. Use \n instead.

Posted: Fri Jul 15, 2005 3:07 pm
by bokehman
Here is a function I have written that builds a mime email (multipart or otherwise). Even if you don't use it at least you can see what you are trying to achieve.

Code: Select all

<?php

// Build mime or plain content

// $email = fill in the recipient
$email = 'you@your-email.com';

// $email_from = fill in the the sender
$email_from = 'me@my-email.com';

// Fill in the subject
$subject = 'Subject';

// Fill in email body text. Can include html tags.
$email_body = 'Body text';

// Attachments
// Any attachment should look like the following and include
// the file name and the path. Add as many as you like.
// $attachments[] = 'c:/path/to/file/filename.ext';
// $attachments[] = 'c:/path/to/another/file/another-filename.ext';

// HTML mail
// Set to TRUE for HTML email or FALSE for plain text email
$html = FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size[mime]){
				return($size[mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = "mime_boundry_multipart/mixed".md5(time())."x";
	$alternative_mime_boundary = "mime_boundry_multipart/alternative_".md5(time())."x";

	$content = "Date: ".date('D, d M Y H:i:s O')."\n".
				"Subject: $subject\n".
				"To: $email\n".
				"From: $email_from\n".
				"MIME-Version: 1.0\n";
				
	if(count($attachments) > 0){
		$content  .= "Content-Type: multipart/mixed;\n" .
  		             " boundary=\"{$mime_boundary}\"\n\n";
             
			if($html == TRUE){
				$content  .= "This is a multi-part message in MIME format.\n\n".
							 "--{$mime_boundary}\n".
							 "Content-Type: multipart/alternative;\n".
							 " boundary=\"{$alternative_mime_boundary}\"\n\n".
							 "--{$alternative_mime_boundary}\n".
							 "Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n".
							 "Content-Transfer-Encoding: 7bit\n\n".
							 strip_tags($email_body)."\n\n".					
							 "--{$alternative_mime_boundary}\n".
							 "Content-Type: text/html; charset=ISO-8859-1\n".
							 "Content-Transfer-Encoding: 7bit\n\n".
							 "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n".
							 "<html>\n".
							 "<head>\n".
						 	 " <meta content=\"text/html;charset=ISO-8859-1\" http-equiv=\"Content-Type\">\n".
						 	 " <title></title>\n".
							 "</head>\n".
							 "<body>\n".
							 $email_body."\n".
							 "</body>\n".
							 "</html>\n\n".
							 "--{$alternative_mime_boundary}--\n";
						 }else{
				$content  .= "This is a multi-part message in MIME format.\n\n".
							 "--{$mime_boundary}\n".
							 "Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n" .
      		     			 "Content-Transfer-Encoding: 7bit\n\n" .
      		    			 strip_tags($email_body)."\n\n";  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) > 0){
				foreach($attachments as $key => $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  "--{$mime_boundary}\n" .
										"Content-Type: $mime_type;\n" .
										" name=\"{$value[basename]}\"\n" .
										"Content-Transfer-Encoding: base64\n" .
										"Content-Disposition: $disposition;\n" .
										" filename=\"{$value[basename]}\"\n\n" .
										$data . "\n";
					}
				}
			}

			$content .= "--{$mime_boundary}--\n";             


			
			
	}elseif($html == TRUE){
		   $content  .= "MIME-Version: 1.0\n" .
 		             	"Content-Type: multipart/alternative;\n".
						" boundary=\"{$alternative_mime_boundary}\"\n\n".
						"--{$alternative_mime_boundary}\n".
						"Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n".
						"Content-Transfer-Encoding: 7bit\n\n".
						strip_tags($email_body)."\n\n".					
						"--{$alternative_mime_boundary}\n".
						"Content-Type: text/html; charset=ISO-8859-1\n".
						"Content-Transfer-Encoding: 7bit\n\n".
						"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n".
						"<html>\n".
						"<head>\n".
						" <meta content=\"text/html;charset=ISO-8859-1\" http-equiv=\"Content-Type\">\n".
						" <title></title>\n".
						"</head>\n".
						"<body>\n".
						$email_body."\n".
						"</body>\n".
						"</html>\n\n".
						"--{$alternative_mime_boundary}--\n";
			
			
	}else{
		$content .= "Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n" .
					"Content-Transfer-Encoding: 7bit\n\n" .
					strip_tags($email_body)."\n";
	}
	return($content);
}

print '<pre>'.htmlspecialchars(mime_content($email, $email_from, $subject, $email_body, $html, $attachments)).'</pre>';

?>
ime email (multipart or otherwise). Even if you don't use it at least you can see what you are trying to achieve.

Code: Select all

<?php

// Build mime or plain content

// $email = fill in the recipient
$email = 'you@your-email.com';

// $email_from = fill in the the sender
$email_from = 'me@my-email.com';

// Fill in the subject
$subject = 'Subject';

// Fill in email body text. Can include html tags.
$email_body = 'Body text';

// Attachments
// Any attachment should look like the following and include
// the file name and the path. Add as many as you like.
// $attachments&#1111;] = 'c:/path/to/file/filename.ext';
// $attachments&#1111;] = 'c:/path/to/another/file/another-filename.ext';

// HTML mail
// Set to TRUE for HTML email or FALSE for plain text email
$html = FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &amp;$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size&#1111;mime]){
				return($size&#1111;mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = &quote;mime_boundry_multipart/mixed&quote;.md5(time()).&quote;x&quote;;
	$alternative_mime_boundary = &quote;mime_boundry_multipart/alternative_&quote;.md5(time()).&quote;x&quote;;

	$content = &quote;Date: &quote;.date('D, d M Y H:i:s O').&quote;\n&quote;.
				&quote;Subject: $subject\n&quote;.
				&quote;To: $email\n&quote;.
				&quote;From: $email_from\n&quote;.
				&quote;MIME-Version: 1.0\n&quote;;
				
	if(count($attachments) &gt; 0){
		$content  .= &quote;Content-Type: multipart/mixed;\n&quote; .
  		             &quote; boundary=\&quote;{$mime_boundary}\&quote;\n\n&quote;;
             
			if($html == TRUE){
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: multipart/alternative;\n&quote;.
							 &quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 strip_tags($email_body).&quote;\n\n&quote;.					
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 &quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
							 &quote;&lt;html&gt;\n&quote;.
							 &quote;&lt;head&gt;\n&quote;.
						 	 &quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						 	 &quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
							 &quote;&lt;/head&gt;\n&quote;.
							 &quote;&lt;body&gt;\n&quote;.
							 $email_body.&quote;\n&quote;.
							 &quote;&lt;/body&gt;\n&quote;.
							 &quote;&lt;/html&gt;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}--\n&quote;;
						 }else{
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
      		     			 &quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
      		    			 strip_tags($email_body).&quote;\n\n&quote;;  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) &gt; 0){
				foreach($attachments as $key =&gt; $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  &quote;--{$mime_boundary}\n&quote; .
										&quote;Content-Type: $mime_type;\n&quote; .
										&quote; name=\&quote;{$value&#1111;basename]}\&quote;\n&quote; .
										&quote;Content-Transfer-Encoding: base64\n&quote; .
										&quote;Content-Disposition: $disposition;\n&quote; .
										&quote; filename=\&quote;{$value&#1111;basename]}\&quote;\n\n&quote; .
										$data . &quote;\n&quote;;
					}
				}
			}

			$content .= &quote;--{$mime_boundary}--\n&quote;;             


			
			
	}elseif($html == TRUE){
		   $content  .= &quote;MIME-Version: 1.0\n&quote; .
 		             	&quote;Content-Type: multipart/alternative;\n&quote;.
						&quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						strip_tags($email_body).&quote;\n\n&quote;.					
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						&quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
						&quote;&lt;html&gt;\n&quote;.
						&quote;&lt;head&gt;\n&quote;.
						&quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						&quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
						&quote;&lt;/head&gt;\n&quote;.
						&quote;&lt;body&gt;\n&quote;.
						$email_body.&quote;\n&quote;.
						&quote;&lt;/body&gt;\n&quote;.
						&quote;&lt;/html&gt;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}--\n&quote;;
			
			
	}else{
		$content .= &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
					&quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
					strip_tags($email_body).&quote;\n&quote;;
	}
	return($content);
}

print '&am if you don't use it at least you can see what you are trying to achieve.

Code: Select all

<?php

// Build mime or plain content

// $email = fill in the recipient
$email = 'you@your-email.com';

// $email_from = fill in the the sender
$email_from = 'me@my-email.com';

// Fill in the subject
$subject = 'Subject';

// Fill in email body text. Can include html tags.
$email_body = 'Body text';

// Attachments
// Any attachment should look like the following and include
// the file name and the path. Add as many as you like.
// $attachments&#1111;] = 'c:/path/to/file/filename.ext';
// $attachments&#1111;] = 'c:/path/to/another/file/another-filename.ext';

// HTML mail
// Set to TRUE for HTML email or FALSE for plain text email
$html = FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &amp;$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size&#1111;mime]){
				return($size&#1111;mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = &quote;mime_boundry_multipart/mixed&quote;.md5(time()).&quote;x&quote;;
	$alternative_mime_boundary = &quote;mime_boundry_multipart/alternative_&quote;.md5(time()).&quote;x&quote;;

	$content = &quote;Date: &quote;.date('D, d M Y H:i:s O').&quote;\n&quote;.
				&quote;Subject: $subject\n&quote;.
				&quote;To: $email\n&quote;.
				&quote;From: $email_from\n&quote;.
				&quote;MIME-Version: 1.0\n&quote;;
				
	if(count($attachments) &gt; 0){
		$content  .= &quote;Content-Type: multipart/mixed;\n&quote; .
  		             &quote; boundary=\&quote;{$mime_boundary}\&quote;\n\n&quote;;
             
			if($html == TRUE){
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: multipart/alternative;\n&quote;.
							 &quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 strip_tags($email_body).&quote;\n\n&quote;.					
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 &quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
							 &quote;&lt;html&gt;\n&quote;.
							 &quote;&lt;head&gt;\n&quote;.
						 	 &quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						 	 &quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
							 &quote;&lt;/head&gt;\n&quote;.
							 &quote;&lt;body&gt;\n&quote;.
							 $email_body.&quote;\n&quote;.
							 &quote;&lt;/body&gt;\n&quote;.
							 &quote;&lt;/html&gt;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}--\n&quote;;
						 }else{
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
      		     			 &quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
      		    			 strip_tags($email_body).&quote;\n\n&quote;;  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) &gt; 0){
				foreach($attachments as $key =&gt; $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  &quote;--{$mime_boundary}\n&quote; .
										&quote;Content-Type: $mime_type;\n&quote; .
										&quote; name=\&quote;{$value&#1111;basename]}\&quote;\n&quote; .
										&quote;Content-Transfer-Encoding: base64\n&quote; .
										&quote;Content-Disposition: $disposition;\n&quote; .
										&quote; filename=\&quote;{$value&#1111;basename]}\&quote;\n\n&quote; .
										$data . &quote;\n&quote;;
					}
				}
			}

			$content .= &quote;--{$mime_boundary}--\n&quote;;             


			
			
	}elseif($html == TRUE){
		   $content  .= &quote;MIME-Version: 1.0\n&quote; .
 		             	&quote;Content-Type: multipart/alternative;\n&quote;.
						&quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						strip_tags($email_body).&quote;\n\n&quote;.					
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						&quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
						&quote;&lt;html&gt;\n&quote;.
						&quote;&lt;head&gt;\n&quote;.
						&quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						&quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
						&quote;&lt;/head&gt;\n&quote;.
						&quote;&lt;body&gt;\n&quote;.
						$email_body.&quote;\n&quote;.
						&quote;&lt;/body&gt;\n&quote;.
						&quote;&lt;/html&gt;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}--\n&quote;;
			
			
	}else{
		$content .= &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
					&quote;Content-Transfer-Encoding: 7bit\n\n&quoe trying to achieve.

Code: Select all

<?php

// Build mime or plain content

// $email = fill in the recipient
$email = 'you@your-email.com';

// $email_from = fill in the the sender
$email_from = 'me@my-email.com';

// Fill in the subject
$subject = 'Subject';

// Fill in email body text. Can include html tags.
$email_body = 'Body text';

// Attachments
// Any attachment should look like the following and include
// the file name and the path. Add as many as you like.
// $attachments&#1111;] = 'c:/path/to/file/filename.ext';
// $attachments&#1111;] = 'c:/path/to/another/file/another-filename.ext';

// HTML mail
// Set to TRUE for HTML email or FALSE for plain text email
$html = FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &amp;$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size&#1111;mime]){
				return($size&#1111;mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = &quote;mime_boundry_multipart/mixed&quote;.md5(time()).&quote;x&quote;;
	$alternative_mime_boundary = &quote;mime_boundry_multipart/alternative_&quote;.md5(time()).&quote;x&quote;;

	$content = &quote;Date: &quote;.date('D, d M Y H:i:s O').&quote;\n&quote;.
				&quote;Subject: $subject\n&quote;.
				&quote;To: $email\n&quote;.
				&quote;From: $email_from\n&quote;.
				&quote;MIME-Version: 1.0\n&quote;;
				
	if(count($attachments) &gt; 0){
		$content  .= &quote;Content-Type: multipart/mixed;\n&quote; .
  		             &quote; boundary=\&quote;{$mime_boundary}\&quote;\n\n&quote;;
             
			if($html == TRUE){
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: multipart/alternative;\n&quote;.
							 &quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 strip_tags($email_body).&quote;\n\n&quote;.					
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 &quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
							 &quote;&lt;html&gt;\n&quote;.
							 &quote;&lt;head&gt;\n&quote;.
						 	 &quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						 	 &quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
							 &quote;&lt;/head&gt;\n&quote;.
							 &quote;&lt;body&gt;\n&quote;.
							 $email_body.&quote;\n&quote;.
							 &quote;&lt;/body&gt;\n&quote;.
							 &quote;&lt;/html&gt;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}--\n&quote;;
						 }else{
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
      		     			 &quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
      		    			 strip_tags($email_body).&quote;\n\n&quote;;  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) &gt; 0){
				foreach($attachments as $key =&gt; $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  &quote;--{$mime_boundary}\n&quote; .
										&quote;Content-Type: $mime_type;\n&quote; .
										&quote; name=\&quote;{$value&#1111;basename]}\&quote;\n&quote; .
										&quote;Content-Transfer-Encoding: base64\n&quote; .
										&quote;Content-Disposition: $disposition;\n&quote; .
										&quote; filename=\&quote;{$value&#1111;basename]}\&quote;\n\n&quote; .
										$data . &quote;\n&quote;;
					}
				}
			}

			$content .= &quote;--{$mime_boundary}--\n&quote;;             


			
			
	}elseif($html == TRUE){
		   $content  .= &quote;MIME-Version: 1.0\n&quote; .
 		             	&quote;Content-Type: multipart/alternative;\n&quote;.
						&quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						strip_tags($email_body).&quote;\n\n&quote;.					
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						&quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
						&quote;&lt;html&gt;\n&quote;.
						&quote;&lt;head&gt;\n&quote;.
						&quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						&quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
						&quote;&lt;/head&gt;\n&quote;.
						&quote;&lt;body&gt;\n&quote;.
						$email_body.&quote;\n&quote;.
						&quote;&lt;/body&gt;\n&quote;.
						&quote;&lt;/html&gt;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}--\n&quote;;
			
			
	}else{
		$content .= &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
					&quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
					strip_tags($email_body).&qu can see what you are trying to achieve.

Code: Select all

<?php

// Build mime or plain content

// $email = fill in the recipient
$email = 'you@your-email.com';

// $email_from = fill in the the sender
$email_from = 'me@my-email.com';

// Fill in the subject
$subject = 'Subject';

// Fill in email body text. Can include html tags.
$email_body = 'Body text';

// Attachments
// Any attachment should look like the following and include
// the file name and the path. Add as many as you like.
// $attachments[] = 'c:/path/to/file/filename.ext';
// $attachments&#1111;] = 'c:/path/to/another/file/another-filename.ext';

// HTML mail
// Set to TRUE for HTML email or FALSE for plain text email
$html = FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &amp;$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size&#1111;mime]){
				return($size&#1111;mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = &quote;mime_boundry_multipart/mixed&quote;.md5(time()).&quote;x&quote;;
	$alternative_mime_boundary = &quote;mime_boundry_multipart/alternative_&quote;.md5(time()).&quote;x&quote;;

	$content = &quote;Date: &quote;.date('D, d M Y H:i:s O').&quote;\n&quote;.
				&quote;Subject: $subject\n&quote;.
				&quote;To: $email\n&quote;.
				&quote;From: $email_from\n&quote;.
				&quote;MIME-Version: 1.0\n&quote;;
				
	if(count($attachments) &gt; 0){
		$content  .= &quote;Content-Type: multipart/mixed;\n&quote; .
  		             &quote; boundary=\&quote;{$mime_boundary}\&quote;\n\n&quote;;
             
			if($html == TRUE){
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: multipart/alternative;\n&quote;.
							 &quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 strip_tags($email_body).&quote;\n\n&quote;.					
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 &quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
							 &quote;&lt;html&gt;\n&quote;.
							 &quote;&lt;head&gt;\n&quote;.
						 	 &quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						 	 &quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
							 &quote;&lt;/head&gt;\n&quote;.
							 &quote;&lt;body&gt;\n&quote;.
							 $email_body.&quote;\n&quote;.
							 &quote;&lt;/body&gt;\n&quote;.
							 &quote;&lt;/html&gt;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}--\n&quote;;
						 }else{
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
      		     			 &quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
      		    			 strip_tags($email_body).&quote;\n\n&quote;;  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) &gt; 0){
				foreach($attachments as $key =&gt; $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  &quote;--{$mime_boundary}\n&quote; .
										&quote;Content-Type: $mime_type;\n&quote; .
										&quote; name=\&quote;{$value&#1111;basename]}\&quote;\n&quote; .
										&quote;Content-Transfer-Encoding: base64\n&quote; .
										&quote;Content-Disposition: $disposition;\n&quote; .
										&quote; filename=\&quote;{$value&#1111;basename]}\&quote;\n\n&quote; .
										$data . &quote;\n&quote;;
					}
				}
			}

			$content .= &quote;--{$mime_boundary}--\n&quote;;             


			
			
	}elseif($html == TRUE){
		   $content  .= &quote;MIME-Version: 1.0\n&quote; .
 		             	&quote;Content-Type: multipart/alternative;\n&quote;.
						&quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						strip_tags($email_body).&quote;\n\n&quote;.					
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						&quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
						&quote;&lt;html&gt;\n&quote;.
						&quote;&lt;head&gt;\n&quote;.
						&quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						&quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
						&quote;&lt;/head&gt;\n&quote;.
						&quote;&lt;body&gt;\n&quote;.
						$email_body.&quote;\n&quote;.
 I have written that builds a mime email (multipart or otherwise). Even if you don't use it at least you can see what you are trying to achieve.

Code: Select all

&lt;?php

// Build mime or plain content

// $email = fill in the recipient
$email = 'you@your-email.com';

// $email_from = fill in the the sender
$email_from = 'me@my-email.com';

// Fill in the subject
$subject = 'Subject';

// Fill in email body text. Can include html tags.
$email_body = 'Body text';

// Attachments
// Any attachment should look like the following and include
// the file name and the path. Add as many as you like.
// $attachments&#1111;] = 'c:/path/to/file/filename.ext';
// $attachments&#1111;] = 'c:/path/to/another/file/another-filename.ext';

// HTML mail
// Set to TRUE for HTML email or FALSE for plain text email
$html = FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &amp;$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size&#1111;mime]){
				return($size&#1111;mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = &quote;mime_boundry_multipart/mixed&quote;.md5(time()).&quote;x&quote;;
	$alternative_mime_boundary = &quote;mime_boundry_multipart/alternative_&quote;.md5(time()).&quote;x&quote;;

	$content = &quote;Date: &quote;.date('D, d M Y H:i:s O').&quote;\n&quote;.
				&quote;Subject: $subject\n&quote;.
				&quote;To: $email\n&quote;.
				&quote;From: $email_from\n&quote;.
				&quote;MIME-Version: 1.0\n&quote;;
				
	if(count($attachments) &gt; 0){
		$content  .= &quote;Content-Type: multipart/mixed;\n&quote; .
  		             &quote; boundary=\&quote;{$mime_boundary}\&quote;\n\n&quote;;
             
			if($html == TRUE){
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: multipart/alternative;\n&quote;.
							 &quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 strip_tags($email_body).&quote;\n\n&quote;.					
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 &quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
							 &quote;&lt;html&gt;\n&quote;.
							 &quote;&lt;head&gt;\n&quote;.
						 	 &quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						 	 &quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
							 &quote;&lt;/head&gt;\n&quote;.
							 &quote;&lt;body&gt;\n&quote;.
							 $email_body.&quote;\n&quote;.
							 &quote;&lt;/body&gt;\n&quote;.
							 &quote;&lt;/html&gt;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}--\n&quote;;
						 }else{
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
      		     			 &quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
      		    			 strip_tags($email_body).&quote;\n\n&quote;;  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) &gt; 0){
				foreach($attachments as $key =&gt; $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  &quote;--{$mime_boundary}\n&quote; .
										&quote;Content-Type: $mime_type;\n&quote; .
										&quote; name=\&quote;{$value&#1111;basename]}\&quote;\n&quote; .
										&quote;Content-Transfer-Encoding: base64\n&quote; .
										&quote;Content-Disposition: $disposition;\n&quote; .
										&quote; filename=\&quote;{$value&#1111;basename]}\&quote;\n\n&quote; .
										$data . &quote;\n&quote;;
					}
				}
			}

			$content .= &quote;--{$mime_boundary}--\n&quote;;             


			
			
	}elseif($html == TRUE){
		   $content  .= &quote;MIME-Version: 1.0\n&quote; .
 		             	&quote;Content-Type: multipart/alternative;\n&quote;.
						&quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						strip_tags($email_body).&quote;\n\n&quote;.					
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						&quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
						&quote;&lt;html&gt;\n&quote;.
						&quote;&lt;head&gt;\n&quote;.
						&quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						&quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
						&quote;&lt;/head&gt;\n&quote;.
						&quote;&lt;body&gt;\n&quote;.
						$email_body.&quote;\n&quote;.
						&quote;&lt;/body&gt;\n&quote;.
						&quote;&lt;/html&gt;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}--\n&quote;;
			
			
	}else{
		$content .= &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
					&quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
					strip_tags($email_body).&quote;\n&quote;;
	}
	return($content);
}

print '&lt;pre&gt;'.htmlspecialchars(mime_content($email, $email_from, $subject, $email_body, $html, $attachments)).'&lt;/ I have written that builds a mime email (multipart or otherwise). Even if you don't use it at least you can see what you are trying to achieve.

Code: Select all

<?php

// Build mime or plain content

// $email = fill in the recipient
$email = 'you@your-email.com';

// $email_from = fill in the the sender
$email_from = 'me@my-email.com';

// Fill in the subject
$subject = 'Subject';

// Fill in email body text. Can include html tags.
$email_body = 'Body text';

// Attachments
// Any attachment should look like the following and include
// the file name and the path. Add as many as you like.
// $attachments[] = 'c:/path/to/file/filename.ext';
// $attachments[] = 'c:/path/to/another/file/another-filename.ext';

// HTML mail
// Set to TRUE for HTML email or FALSE for plain text email
$html = FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size[mime]){
				return($size[mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = "mime_boundry_multipart/mixed".md5(time())."x";
	$alternative_mime_boundary = "mime_boundry_multipart/alternative_".md5(time())."x";

	$content = "Date: &quote;.date('D, d M Y H:i:s O').&quote;\n&quote;.
				&quote;Subject: $subject\n&quote;.
				&quote;To: $email\n&quote;.
				&quote;From: $email_from\n&quote;.
				&quote;MIME-Version: 1.0\n&quote;;
				
	if(count($attachments) &gt; 0){
		$content  .= &quote;Content-Type: multipart/mixed;\n&quote; .
  		             &quote; boundary=\&quote;{$mime_boundary}\&quote;\n\n&quote;;
             
			if($html == TRUE){
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: multipart/alternative;\n&quote;.
							 &quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 strip_tags($email_body).&quote;\n\n&quote;.					
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 &quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
							 &quote;&lt;html&gt;\n&quote;.
							 &quote;&lt;head&gt;\n&quote;.
						 	 &quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						 	 &quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
							 &quote;&lt;/head&gt;\n&quote;.
							 &quote;&lt;body&gt;\n&quote;.
							 $email_body.&quote;\n&quote;.
							 &quote;&lt;/body&gt;\n&quote;.
							 &quote;&lt;/html&gt;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}--\n&quote;;
						 }else{
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
      		     			 &quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
      		    			 strip_tags($email_body).&quote;\n\n&quote;;  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) &gt; 0){
				foreach($attachments as $key =&gt; $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  &quote;--{$mime_boundary}\n&quote; .
										&quote;Content-Type: $mime_type;\n&quote; .
										&quote; name=\&quote;{$value&#1111;basename]}\&quote;\n&quote; .
										&quote;Content-Transfer-Encoding: base64\n&quote; .
										&quote;Content-Disposition: $disposition;\n&quote; .
										&quote; filename=\&quote;{$value&#1111;basename]}\&quote;\n\n&quote; .
										$data . &quote;\n&quote;;
					}
				}
			}

			$content .= &quote;--{$mime_boundary}--\n&quote;;             


			
			
	}elseif($html == TRUE){
		   $content  .= &quote;MIME-Version: 1.0\n&quote; .
 		             	&quote;Content-Type: multipart/alternative;\n&quote;.
						&quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						strip_tags($email_body).&quote;\n\n&quote;.					
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						&quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
						&quote;&lt;html&gt;\n&quote;.
						&quote;&lt;head&gt;\n&quote;.
						&quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						&quote; as many as you like.
// $attachments[] = 'c:/path/to/file/filename.ext';
// $attachments[] = 'c:/path/to/another/file/another-filename.ext';

// HTML mail
// Set to TRUE for HTML email or FALSE for plain text email
$html = FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size[mime]){
				return($size[mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = "mime_boundry_multipart/mixed".md5(time())."x";
	$alternative_mime_boundary = "mime_boundry_multipart/alternative_".md5(time())."x";

	$content = "Date: ".date('D, d M Y H:i:s O')."\n".
				"Subject: $subject\n".
				"To: $email\n".
				"From: $email_from\n".
				"MIME-Version: 1.0\n";
				
	if(count($attachments) > 0){
		$content  .= "Content-Type: multipart/mixed;\n" .
  		             " boundary=\"{$mime_boundary}\"\n\n";
             
			if($html == TRUE){
				$content  .= "This is a multi-part message in MIME format.\n\n".
							 "--{$mime_boundary}\n".
							 "Content-Type: multipart/alternative;\n".
							 " boundary=\"{$alternative_mime_boundary}\"\n\n".
							 "--{$alternative_mime_boundary}\n".
							 "Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n".
							 "Content-Transfer-Encoding: 7bit\n\n".
							 strip_tags($email_body)."\n\n".					
							 "--{$alternative_mime_boundary}\n".
							 "Content-Type: text/html; charset=ISO-8859-1\n".
							 "Content-Transfer-Encoding: 7bit\n\n".
							 "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n".
							 "<html>\n".
							 "<head>\n".
						 	 " <meta content=\"text/html;charset=ISO-8859-1\" http-equiv=\"Content-Type\">\n".
						 	 " <title></title>\n".
							 "</head>\n".
							 "&lt;body&gt;\n&quote;.
							 $email_body.&quote;\n&quote;.
							 &quote;&lt;/body&gt;\n&quote;.
							 &quote;&lt;/html&gt;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}--\n&quote;;
						 }else{
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
      		     			 &quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
      		    			 strip_tags($email_body).&quote;\n\n&quote;;  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) &gt; 0){
				foreach($attachments as $key =&gt; $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  &quote;--{$mime_boundary}\n&quote; .
										&quote;Content-Type: $mime_type;\n&quote; .
			= FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size[mime]){
				return($size[mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = "mime_boundry_multipart/mixed&quote;.md5(time()).&quote;x&quote;;
	$alternative_mime_boundary = &quote;mime_boundry_multipart/alternative_&quote;.md5(time()).&quote;x&quote;;

	$content = &quote;Date: &quote;.date('D, d M Y H:i:s O').&quote;\n&quote;.
				&quote;Subject: $subject\n&quote;.
				&quote;To: $email\n&quote;.
				&quote;From: $email_from\n&quote;.
				&quote;MIME-Version: 1.0\n&quote;;
				
	if(count($attachments) &gt; 0){
		$content  .= &quote;Content-Type: multipart/mixed;\n&quote; .
  		             &quote; boundary=\&quote;{$mime_boundary}\&quote;\n\n&quote;;
             
			if($html == TRUE){
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: multipart/alternative;\n&quote;.
							 &quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 strip_tags($email_body).&quote;\n\n&quote;.					
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 &quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
							 &quote;&lt;html&gt;\n&quote;.
							 &quote;&lt;head&gt;\n&quote;.
						 	 &quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						 	 &quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
							 &quote;&lt;/head&gt;\n&quote;.
							 &quote;&lt;body&gt;\n&quote;.
							 $email_body.&quote;\n&quote;.
							 &quote;&lt;/body&gt;\n&quote;.
							 &quote;&lt;/html&gt;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}--\n&quote;;
						 }else{
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
      		     			 &quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
      		    			 strip_tags($email_body).&quote;\n\n&quote;;  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) &gt; 0){
				foreach($attachments as $key =&gt; $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  &quote;--{$mime_boundary}\n&quote; .
										&quote;Content-Type: $mime_type;\n&quote; .
										&quote; name=\&quote;{$value&#1111;basename]}\&quote;\n&quote; .
										&quote;Content-Transfer-Encoding: base64\n&quote; .
										&quote;Content-Disposition: $disposition;\n&quote; .
										&quote; filename=\&quote;{$value&#1111;basename]}\&quote;\n\n&quote; .
										$data . &quote;\n&quote;;
					}
				}
			}

			$content .= &quote;--{$mime_boundary}--\n&quote;;             


			
			
	}elseif($html == TRUE){
		   $content  .= &quote;MIME-Version: 1.0\n&quote; .
 		             	&quote;Content-Type: multipart/alternative;\n&quote;.
						&quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						strip_tags($email_body).&quote;\n\n&quote;.					
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						&quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&qun if you don't use it at least you can see what you are trying to achieve.

Code: Select all

<?php

// Build mime or plain content

// $email = fill in the recipient
$email = 'you@your-email.com';

// $email_from = fill in the the sender
$email_from = 'me@my-email.com';

// Fill in the subject
$subject = 'Subject';

// Fill in email body text. Can include html tags.
$email_body = 'Body text';

// Attachments
// Any attachment should look like the following and include
// the file name and the path. Add as many as you like.
// $attachments[] = 'c:/path/to/file/filename.ext';
// $attachments[] = 'c:/path/to/another/file/another-filename.ext';

// HTML mail
// Set to TRUE for HTML email or FALSE for plain text email
$html = FALSE;

function mime_content($email, $email_from, $subject, $email_body, $html = NULL, &amp;$attachments = NULL)
{
	
	if (!function_exists('mime_content_type')){
		function mime_content_type($file){
			@$size = getimagesize($file);
			if($size&#1111;mime]){
				return($size&#1111;mime]);
			}
			return('application/octet-stream');
		}
	}	
	// Generate a boundary string
	$mime_boundary = &quote;mime_boundry_multipart/mixed&quote;.md5(time()).&quote;x&quote;;
	$alternative_mime_boundary = &quote;mime_boundry_multipart/alternative_&quote;.md5(time()).&quote;x&quote;;

	$content = &quote;Date: &quote;.date('D, d M Y H:i:s O').&quote;\n&quote;.
				&quote;Subject: $subject\n&quote;.
				&quote;To: $email\n&quote;.
				&quote;From: $email_from\n&quote;.
				&quote;MIME-Version: 1.0\n&quote;;
				
	if(count($attachments) &gt; 0){
		$content  .= &quote;Content-Type: multipart/mixed;\n&quote; .
  		             &quote; boundary=\&quote;{$mime_boundary}\&quote;\n\n&quote;;
             
			if($html == TRUE){
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: multipart/alternative;\n&quote;.
							 &quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 strip_tags($email_body).&quote;\n\n&quote;.					
							 &quote;--{$alternative_mime_boundary}\n&quote;.
							 &quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
							 &quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
							 &quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
							 &quote;&lt;html&gt;\n&quote;.
							 &quote;&lt;head&gt;\n&quote;.
						 	 &quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						 	 &quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
							 &quote;&lt;/head&gt;\n&quote;.
							 &quote;&lt;body&gt;\n&quote;.
							 $email_body.&quote;\n&quote;.
							 &quote;&lt;/body&gt;\n&quote;.
							 &quote;&lt;/html&gt;\n\n&quote;.
							 &quote;--{$alternative_mime_boundary}--\n&quote;;
						 }else{
				$content  .= &quote;This is a multi-part message in MIME format.\n\n&quote;.
							 &quote;--{$mime_boundary}\n&quote;.
							 &quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote; .
      		     			 &quote;Content-Transfer-Encoding: 7bit\n\n&quote; .
      		    			 strip_tags($email_body).&quote;\n\n&quote;;  
      					 }
		
	

			// Deal with attachments array 
			if(count($attachments) &gt; 0){
				foreach($attachments as $key =&gt; $value){
					$mime_type = mime_content_type($value);
					if(is_file($value)){
						if(ereg('^image', $mime_type)){
							$disposition = 'inline';
						}else{
							$disposition = 'attachment';
						}
						$filesize = filesize($value);
						$file = fopen($value,'rb');
						$data = fread($file,$filesize);
						fclose($file);

						// Base64 encode the file data
						$data = chunk_split(base64_encode($data));
						$value = pathinfo($value);
						$content    .=  &quote;--{$mime_boundary}\n&quote; .
										&quote;Content-Type: $mime_type;\n&quote; .
										&quote; name=\&quote;{$value&#1111;basename]}\&quote;\n&quote; .
										&quote;Content-Transfer-Encoding: base64\n&quote; .
										&quote;Content-Disposition: $disposition;\n&quote; .
										&quote; filename=\&quote;{$value&#1111;basename]}\&quote;\n\n&quote; .
										$data . &quote;\n&quote;;
					}
				}
			}

			$content .= &quote;--{$mime_boundary}--\n&quote;;             


			
			
	}elseif($html == TRUE){
		   $content  .= &quote;MIME-Version: 1.0\n&quote; .
 		             	&quote;Content-Type: multipart/alternative;\n&quote;.
						&quote; boundary=\&quote;{$alternative_mime_boundary}\&quote;\n\n&quote;.
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/plain; charset=ISO-8859-1; format=flowed\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						strip_tags($email_body).&quote;\n\n&quote;.					
						&quote;--{$alternative_mime_boundary}\n&quote;.
						&quote;Content-Type: text/html; charset=ISO-8859-1\n&quote;.
						&quote;Content-Transfer-Encoding: 7bit\n\n&quote;.
						&quote;&lt;!DOCTYPE html PUBLIC \&quote;-//W3C//DTD HTML 4.01 Transitional//EN\&quote;&gt;\n&quote;.
						&quote;&lt;html&gt;\n&quote;.
						&quote;&lt;head&gt;\n&quote;.
						&quote; &lt;meta content=\&quote;text/html;charset=ISO-8859-1\&quote; http-equiv=\&quote;Content-Type\&quote;&gt;\n&quote;.
						&quote; &lt;title&gt;&lt;/title&gt;\n&quote;.
						&quote;&lt;/head&gt;\n&quote;.
						&quote;&lt;body&gt;\n&quote;.
						$email_body.&at least you can see what you are trying to achieve.

Code: Select all

<?php

// Build mime or plain content

// $email = fill in the recipient
$email = 'you@your-email.com';

// $email_from = fill in the the sender
$email_from = 'me@my-email.com';

// Fill in the subject
$subject = 'Subject';

// Fill in email body t

Posted: Fri Jul 15, 2005 10:28 pm
by keress
Thanks for all the input. I WAS having a hard time finding a relevant post through the search function. I'm attaching the code I'm working with. What we've done is really different from what's been shown. I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

<?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$email_body = "Body of email";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; 
charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);

<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698" height="7209" valign="top"><div align="justify"> 
        <h1>Uniform Residential Loan Application </h1>
        <p >This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as "Borrower" 
          or "Co-Borrower," as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the "Borrower" (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. </p>
      </div>
      <table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
        <tr> 
          <td><div align="center"> 
              <h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
            </div></td>
        </tr>
      </table>
      <br>
   
    <table width=698 border="1" cellpadding="3" cellspacing="0">
        <td width="211">Mortgage Applied For <br>
          '.$Mort_Type.' 
        <td width="90">Amount <br>
          '.$Amount.' 
        <td width="104">Int. Rate <br>
          '.$Int_Rate.' 
        <td width="116">Duration <br>
          '.$No_Months.' 
        <td width="135">Amortization <br>
          '.$Amort_Type.' </table> 
  
	  </td>
  </tr>
</table>
';				


 if(!mail( "$send_to", "ASAsZXzsczxcZXC","$vars", "From:  <noreply@lkcwebdesign.test>"))
 {
 echo "Your message could not be sent.  Please call our office at the number below\n";
 }
 else
  {
 echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
 }
 </body>
</html>
			?>
me finding a relevant post through the search function. I'm attaching the code I'm working with. What we've done is really different from what's been shown. I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

&lt;?

//Who do you want this email to be sent to?
$send_to = &quote;linda@lkcwebdesign.com&quote;; 
			
$vars = '
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$email_body = &quote;Body of email&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; 
charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@lkcwebdesign.test&gt;&quote;))
 {
 echo &quote;Your message could not be sent.  Please call our office at the number below\n&quote;;
 }
 else
  {
 echo &quote;Your earch function.  I'm attaching the code I'm working with.  What we've done is really different from what's been shown.  I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

&lt;?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$email_body = &quote;Body of email&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; 
charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@lkcwebdesign.test&gt;&quote;))
 {
 echo &quote;Your message could not be sith.  What we've done is really different from what's been shown.  I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

<?

//Who do you want this email to be sent to?
$send_to = &quote;linda@lkcwebdesign.com&quote;; 
			
$vars = '
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$email_body = &quote;Body of email&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; 
charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@lkcwebdesign.test&gt;&quote;))
 {
 echo &quote;Your message could not be sent.  Please call our office at the number e code I'm working with.  What we've done is really different from what's been shown.  I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

<?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$email_body = "Body of email";
$additional_headers = "From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; 
charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' &lt;/t input.  I WAS having a hard time finding a relevant post through the search function.  I'm attaching the code I'm working with.  What we've done is really different from what's been shown.  I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

&lt;?

//Who do you want this email to be sent to?
$send_to = &quote;linda@lkcwebdesign.com&quote;; 
			
$vars = '
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$email_body = &quote;Body of email&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; 
charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@lkcwebdesign.test&gt;&quote;))
 {
 echo &quote;Your message could not be sent.  Please call our office at the number below\n&quote;;
 }
 else
  {
 echo &quote;Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n&quote;;
 }
 &lt;/body&gt;
&amp input.  I WAS having a hard time finding a relevant post through the search function.  I'm attaching the code I'm working with.  What we've done is really different from what's been shown.  I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

<?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$email_body = "Body of email";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; 
charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);

<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&l_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; 
charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);

<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698" height="7209" valign="top"><div align="justify"> 
        <h1>Uniform Residential Loan Application </h1>
        <p >This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as "Borrower" 
          or "Co-Borrower," as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the "Borrower" (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. </p>
      </div>
      <table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
        <tr> 
          <td><div align="center"> 
              <h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
            </div></td>
        </tr&amplt;html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gtsearch function.  I'm attaching the code I'm working with.  What we've done is really different from what's been shown.  I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

<?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$email_body = "Body of email";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; 
charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amttaching the code I'm working with.  What we've done is really different from what's been shown.  I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

&lt;?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = "linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$email_body = &quote;Body of email&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; 
charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quong a relevant post through the search function.  I'm attaching the code I'm working with.  What we've done is really different from what's been shown.  I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

<?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$email_body = &quote;Body of email";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; 
charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);

<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

<?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$email_body = &quote;Body of email&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; 
charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@lkcwebdesign.test&gt;&quote;))
 {
 echo &quote;Your message could not be sent.  Please call our office at the number below\n&quote;;
 }
 else
  {
 echo &quote;Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n&quote;;
 }
 &lt;/body&a
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$email_body = "Body of email";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; 
charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);

<html>
<head>
  <title>Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&S having a hard time finding a relevant post through the search function.  I'm attaching the code I'm working with.  What we've done is really different from what's been shown.  I've tried fitting in some of your code, but it still is not outputting as html.

Code: Select all

<?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com"; 
			
$vars = '
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$email_body = "Body of email";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; 
charset=iso-8859-1\r\n";
mail($recipient, $subject, $email_body, $additional_headers);

<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698" height="7209" valign="top"><div align="justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; outputting as html.

Code: Select all

<?

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com&quote;; 
			
$vars = '
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$email_body = &quote;Body of email&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; 
charset=iso-8859-1\r\n&quote;;
mail($recipient, $subject, $email_body, $additional_headers);

&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@lkcwebdesign.test&gt;&quote;))
 {
 echo &quote;Your message could not be sent.  Please call our office at the number below\n&quote;;
 }
 else
  {
 echo &quote;Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n&quote;;
 }
 &lt;/body&gt;
&lt;/html&gt;
			?&glinda@lkcwebdesign.com"; 
			
$vars = '
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$email_body = "Body of email";
$additional_headers = "From: linda@lkcwebdesign.com\

Posted: Fri Jul 15, 2005 11:04 pm
by s.dot
take out that $vars = ' line.

That definately is messing up the syntax highlighting, and perhaps the functionability of your code... if it even runs at all :P

Posted: Fri Jul 15, 2005 11:07 pm
by s.dot
use the syntax

Code: Select all

if(mail($sent_to, $subject, $message, $additional_headers)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }
the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(, $subject, $message, $additional_headers)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up yous)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(} ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(n sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(p]if(mail($sent_to, $subject, $message, $additional_headers)){ echo &quote;Mail has been sent.&quote;; } ELSE { echo &quote;ERROR!&quote;; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: p]if(mail($sent_to, $subject, $message, $additional_headers)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(rs)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(ail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(ct, $message, $additional_headers)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(
the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(e]if(mail($sent_to, $subject, $message, $additional_headers)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :( messing up your code

edit: id delete the post above this, but I don't see the button :( ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(dit: id delete the post above this, but I don't see the button :(p]if(mail($sent_to, $subject, $message, $additional_headers)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(to, $subject, $message, $additional_headers)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: p]

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(t_to, $subject, $message, $additional_headers)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :( be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(ars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(ote;Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(if(mail($sent_to, $subject, $message, $additional_headers)){ echo "Mail has been sent."; } ELSE { echo "ERROR!"; }

the $vars = ' line doesn't need to be there, and is probably messing up your code

edit: id delete the post above this, but I don't see the button :(

Posted: Fri Jul 15, 2005 11:26 pm
by keress
I tried taking that out and it still sends an email showing all the code, instead of a page formatted by html.

Posted: Fri Jul 15, 2005 11:50 pm
by s.dot
if you're trying to send the entire html page, make the whole page the $email_body (making sure not to mess up the quotes)

then mail at the bottom of the page

Posted: Sat Jul 16, 2005 12:04 am
by s.dot
try this code
its a bit sloppy, when I pasted it into my editor it was all one line

Code: Select all

<? //Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
 '<html>
 <head>
 <title>Uniform Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		</p>
 		</div>
 			<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
 				<tr>
 					<td>
 					<div align="center">
 					<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
 					</div>
 					</td>
 				</tr>
 			</table>
 			<br>
 			<table width="698" border="1" cellpadding="3" cellspacing="0">
 				<td width="211">Mortgage Applied For <br> '.$Mort_Type.'
 				<td width="90">Amount <br>       '.$Amount.' 
 				<td width="104">Int. Rate <br>          '.$Int_Rate.'
 				<td width="116">Duration <br>          '.$No_Months.'
 				<td width="135">Amortization <br>          '.$Amort_Type.'
 			</table>
 		</td>
 	</tr>
 </table>
 </body>
 </html>';
 
if(mail($send_to,$subject,$email_body,$additional_headers)){ echo "SUCCESS!"; } ELSE { echo "FAILURE!"; }
?>
On a side note, your HTML is a little messed up (the second table), there's no <TR></TR> and you didn't close the table cells </TD>

Also, make sure the email program you're trying to view this in supports HTML into my editor it was all one line

Code: Select all

<? //Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
 '<html>
 <head>
 <title>Uniform Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		</p>
 		</div>
 			<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
 				<tr>
 					<td>
 					<div align="center">
 					<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
 					</div>
 					</td>
 				</tr>
 			</table>
 			<br>
 			<table width="698" border="1" cellpadding="3" cellspacing="0">
 				<td width="211">Mortgage Applied For <br> '.$Mort_Type.'
 				<td width="90">Amount <br>       '.$Amount.' 
 				<td width="104">Int. Rate <br>          '.$Int_Rate.'
 				<td width="116">Duration <br>          '.$No_Months.'
 				<td width="135">Amortization <br>          '.$Amort_Type.'
 			</table>
 		</td>
 	</tr>
 </table>
 </body>
 </html>';
 
if(mail($send_to,$subject,$email_body,$additional_headers)){ echo "SUCCESS!"; } ELSE { echo "FAILURE!"; }
?>
On a side note, your HTML is a little messed up (the seconphp]
<? //Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n";
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body =
'&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
&lt;tr&gt;
&lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;
&lt;div align=&quote;justify&quote;&gt;
&lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
&lt;p&gt;This application is designed to be completed by the applicant(s) with the Lender\'s assistance.
Applicants should complete this form as &amp;quot;Borrower&amp;quot; or &amp;quot;Co-Borrower,&amp;quot; as applicable.
Co-Borrower information must also be provided (and the appropriate box checked) when the income or
assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
basis for loan qualification, but his or her liabilities must be considered
because the Borrower resides in a community property state, the security
property is a location in a community property state, or the Borrower is relying on other property located
in a community property state as a basis for repayment of the loan.
&lt;/p&gt;
&lt;/div&gt;
&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div align=&quote;center&quote;&gt;
&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
&lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt; '.$Mort_Type.'
&lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt; '.$Amount.'
&lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt; '.$Int_Rate.'
&lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt; '.$No_Months.'
&lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt; '.$Amort_Type.'
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;';

if(mail($send_to,$subject,$email_body,$additional_headers)){ echo &quote;SUCCESS!&quote;; } ELSE { echo &quote;FAILURE!&quois email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body =
'&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
&lt;tr&gt;
&lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;
&lt;div align=&quote;justify&quote;&gt;
&lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
&lt;p&gt;This application is designed to be completed by the applicant(s) with the Lender\'s assistance.
Applicants should complete this form as &amp;quot;Borrower&amp;quot; or &amp;quot;Co-Borrower,&amp;quot; as applicable.
Co-Borrower information must also be provided (and the appropriate box checked) when the income or
assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
basis for loan qualification, but his or her liabilities must be considered
because the Borrower resides in a community property state, the security
property is a location in a community property state, or the Borrower is relying on other property located
in a community property state as a basis for repayment of the loan.
&lt;/p&gt;
&lt;/div&gt;
&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div align=&quote;center&quote;&gt;
&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
&lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt; '.$Mort_Type.'
&lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt; '.$Amount.'
&lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt; '.$Int_Rate.'
&lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt; '.$No_Months.'
&lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt; '.$Amort_Type.'
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;';

if(mail($send_to,$subject,$email_body,$additional_headers)){ echo &quote;SUCCESS!&quote;; } ELSE { echo &quote;FAILURE!&quote;; }
?&gt;

//Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body =
'<html>
<head>
<title>Uniform Residential Loan Application</title>
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
&lt;tr&gt;
&lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;
&lt;div align=&quote;justify&quote;&gt;
&lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
&lt;p&gt;This application is designed to be completed by the applicant(s) with the Lender\'s assistance.
Applicants should complete this form as &amp;quot;Borrower&amp;quot; or &amp;quot;Co-Borrower,&amp;quot; as applicable.
Co-Borrower information must also be provided (and the appropriate box checked) when the income or
assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
basis for loan qualification, but his or her liabilities must be considered
because the Borrower resides in a community property state, the security
property is a location in a community property state, or the Borrower is relying on other property located
in a community property state as a basis for repayment of the loan.
&lt;/p&gt;
&lt;/div&gt;
&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div align=&quote;center&quote;&gt;
&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
&lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt; '.$Mort_Type.'
&lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt; '.$Amount.'
&lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt; '.$Int_Rate.'
&lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt; '.$No_Months.'
&lt;td width=&quote;135&quote;&gt;Amortization &lt;br& a bit sloppy, when I pasted it into my editor it was all one line

Code: Select all

<? //Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
 '<html>
 <head>
 <title>Uniform Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		</p>
 		</div>
 			<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
 				<tr>
 					<td>
 					<div align="center">
 					<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
 					</div>
 					</td>
 				</tr>
 			</table>
 			<br>
 			<table width="698" border="1" cellpadding="3" cellspacing="0">
 				<td width="211">Mortgage Applied For <br> '.$Mort_Type.'
 				<td width="90">Amount <br>       '.$Amount.' 
 				<td width="104">Int. Rate <br>          '.$Int_Rate.'
 				<td width="116">Duration <br>          '.$No_Months.'
 				<td width="135">Amortization <br>          '.$Amort_Type.'
 			</table>
 		</td>
 	</tr>
 </table>
 </body>
 </html>';
 
if(mail($send_to,$subject,$email_body,$additional_headers)){ echo "SUCCESS!"; } ELSE { echo "FAILURE!"; }
?>
On a side note, your HTML is a little messed up (the second table), there's no <TR></TR> and you didn't close the table cells </TD>

Also, make sure t a bit sloppy, when I pasted it into my editor it was all one line

Code: Select all

<? //Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
 '<html>
 <head>
 <title>Uniform Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as "Borrower" or &quot;Co-Borrower,&amp;quot; as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		&lt;/p&gt;
 		&lt;/div&gt;
 			&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
 				&lt;tr&gt;
 					&lt;td&gt;
 					&lt;div align=&quote;center&quote;&gt;
 					&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
 					&lt;/div&gt;
 					&lt;/td&gt;
 				&lt;/tr&gt;
 			&lt;/table&gt;
 			&lt;br&gt;
 			&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
 				&lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt; '.$Mort_Type.'
 				&lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;       '.$Amount.' 
 				&lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;     rm Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		</p>
 		</div>
 			<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
 				<tr>
 					<td>
 					<div align="center">
 					<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
 					</div>
 					</td>
 				</tr>
 			</table>
 			<br>
 			<table width="698" border="1" cellpadding="3" cellspacing="0">
 				<td width="211">Mortgage Applied For <br> '.$Mort_Type.'
 				<td width="90">Amount <br>       '.$Amount.' 
 				<td width="104">Int. Rate <br>    e; align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		&lt;p&gt;This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as &amp;quot;Borrower&amp;quot; or &amp;quot;Co-Borrower,&amp;quot; as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		&lt;/p&gt;
 		&lt;/div&gt;
 			&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
 				&lt;tr&gt;
 					&lt;td&gt;
 					&lt;div align=&quote;center&quote;&gt;
 					&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
 					&lt;/div&gt;
 					&lt;/td&gt;
 				&lt;/tr&gt;
 			&lt;/table&gt;
 			&lt;br&gt;
 			&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
 				&lt;td width=&am

Code: Select all

<? //Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
 '<html>
 <head>
 <title>Uniform Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
 	&lt;tr&gt;
 		&lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;
 		&lt;div align=&quote;justify&quote;&gt;
 		&lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
 		&lt;p&gt;This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as &amp;quot;Borrower&amp;quot; or &amp;quot;Co-Borrower,&amp;quot; as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		&lt;/p&gt;
 		&lt;/div&gt;
 			&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
 				&lt;tr&gt;
 					&lt;td&gt;
 					&lt;div align=&quote;center&quote;&gt;
 					&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
 					&lt;/div&gt;
 					&lt;/td&gt;
 				&lt;/tr&gt;
 			&lt;/table&gt;
 			&lt;br&gt;
 			&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
 				&lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt; '.$Mort_Type.'
 				&lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;       '.$Amount.' 
 				&lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;          '.$Int_Rate.'
 				&lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;          '.$No_Months.'
 				&lt;td width=&quote;135&quote;&gt;Amortizatiop;amp;lt;? //Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body = 
 '&lt;html&gt;
 &lt;head&gt;
 &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
 &lt;/head&gt;
 &lt;body&gt;
 &lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
 	&lt;tr&gt;
 		&lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;
 		&lt;div align=&quote;justify&quote;&gt;
 		&lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
 		&lt;p&gt;This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as &amp;quot;Borrower&amp;quot; or &amp;quot;Co-Borrower,&amp;quot; as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		&lt;/p&gt;
 		&lt;/div&gt;
 			&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
 				&lt;tr&gt;
 					&lt;td&gt;
 					&lt;div align=&quote;center&quote;&gt;
 					&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
 					&lt;/div&gt;
 					&lt;/td&gt;
 				&lt;/tr&gt;
 			&lt;/table&gt;
 			&lt;br&gt;
 			&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
 				&lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt; '.$Mort_Type.'
 				&lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;       '.$Amount.' 
 				&lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;          '.$Int_Rate.'
 				&lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;          '.$No_Months.'
 				&lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;          '.$Amort_Type.'
 			&lt;/table&gt;
 		&lt;/td&gt;
 	&lt;/tr&gt;
 &lt;/table&gt;
 &lt;/body&gt;
 &lt;/html&gt;';
 
if(m editor it was all one line

Code: Select all

<? //Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
 '<html>
 <head>
 <title>Uniform Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		</p>
 		</div>
 			<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
 				<tr>
 					<td>
 					<div align="center">
 					<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
 					</div>
 					</td>
 				</tr>
 			</table>
 			<br>
 			<table width="698" border="1" cellpadding="3" cellspacing="0">
 				<td width="211">Mortgage Applied For <br> '.$Mort_Type.'
 				<td width="90">Amount <br>       '.$Amount.' 
 				<td width="104">Int. Rate <br&amom";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
 '<html>
 <head>
 <title>Uniform Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		</p>
 		</div>
 			<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
 				<tr>
 					<td>
 					<div align="center">
 					<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
 					</div>
 					</td>
 				</tr>
 			</table>
 			<br>
 			<table width="698" border="1" cellpadding="3" cellspacing="0">
 				<td width="211">Mortgage Applied For <br> '.$Mort_Type.'
 				<td width="90">Amount <br>       '.$Amount.' 
 				<td width="104">Int. Rate <br>          '.$Int_Rate.'
 				<td width="116">Duration <br>          '.$No_Months.'
 				<td width="135">Amortization <br>          '.$Amort_Type.'
 			</table>
 		</td>
 	</tr>
 </table>
 </body>
 </html>';
 
if(mail($send_to,$subject,$email_body,$additional_headers)){ echo "SUCCESS!"; } ELSE { echo "FAILURE!"; }
?>
On a side note, your HTML is a little messed up (the second table), there's no <TR></TR> and you didn't close the table cells </TD>
m: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body =
'<html>
<head>
<title>Uniform Residential Loan Application</title>
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing=&quote;0&quote;&gt;
&lt;tr&gt;
&lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;
&lt;div align=&quote;justify&quote;&gt;
&lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
&lt;p&gt;This application is designed to be completed by the applicant(s) with the Lender\'s assistance.
Applicants should complete this form as &amp;quot;Borrower&amp;quot; or &amp;quot;Co-Borrower,&amp;quot; as applicable.
Co-Borrower information must also be provided (and the appropriate box checked) when the income or
assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
basis for loan qualification, but his or her liabilities must be considered
because the Borrower resides in a community property state, the security
property is a location in a community property state, or the Borrower is relying on other property located
in a community property state as a basis for repayment of the loan.
&lt;/p&gt;
&lt;/div&gt;
&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div align=&quote;center&quote;&gt;
&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
&lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt; '.$Mort_Type.'
&lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt; '.$Amount.'
&lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt; , when I pasted it into my editor it was all one line

Code: Select all

<? //Who do you want this email to be sent to?
$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
 '<html>
 <head>
 <title>Uniform Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		</p>
 		</div>
 			<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
 				<tr>
 					<td>
 					<div align="center">
 					<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
 					</div>
 					</td>
 				</tr>
 			</table>
 			<br>
 			<table width=&quotem";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
 '<html>
 <head>
 <title>Uniform Residential Loan Application</title>
 </head>
 <body>
 <table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
 	<tr>
 		<td width="698" height="7209" valign="top">
 		<div align="justify">
 		<h1>Uniform Residential Loan Application </h1>
 		<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance. 
 		Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable. 
 		Co-Borrower information must also be provided (and the appropriate box checked) when the income or 
 		assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
 		as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
 		basis for loan qualification, but his or her liabilities must be considered 
 		because the Borrower resides in a community property state, the security 
 		property is a location in a community property state, or the Borrower is relying on other property located
 		in a community property state as a basis for repayment of the loan.
 		</p>
 		</div>
 			<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
 				<tr>
 					<td>
 					<div align="center">
 					<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
 					</div>
 					</td>
 				</tr>
 			</table>
 			<br>
 			<table width="698" border="1" cellpadding="3" cellspacing="0">
 				<td width="211">Mortgage Applied For <br> '.$Mort_Type.'
 				<td width="90">Amount <br>       '.$Amount.' 
 				<td width="104">Int. Rate <br>          '.$Int_Rate.'
 				<td width="116">Duration <br>          '.$No_Months.'
 				<td width="135">Amortization <br>          '.$Amort_Type.'
 			</table>
 		</td>
 	</tr>
 </table>
 </body>
 </html>';
 
if(mail($send_to,$subject,$email_body,$additional_headers)){ echo "SUCCESS!"; } ELSE { echo "FAILURE!"; }
?>
On a side note, your HTML is a little messed up (the second table), there's no <TR></TR> and you didn't close the table cells </TD>

Also, make sure the email program you're trying to viem\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body =
'<html>
<head>
<title>Uniform Residential Loan Application</title>
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="698" height="7209" valign="top">
<div align="justify">
<h1>Uniform Residential Loan Application </h1>
<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance.
Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable.
Co-Borrower information must also be provided (and the appropriate box checked) when the income or
assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
basis for loan qualification, but his or her liabilities must be considered
because the Borrower resides in a community property state, the security
property is a location in a community property state, or the Borrower is relying on other property located
in a community property state as a basis for repayment of the loan.
</p>
</div>
<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
<tr>
<td>
<div align="center">
<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
</div>
</td>
</tr>
</table>
<br>
<table width="698" border="1" cellpadding="3" cellspacing="0">
<td width="211">Mortgage Applied For <br> '.$Mort_Type.'
<td width="90">Amount <br> '.$Amount.'
<td width="104">Int. Rate <br> '.$Int_Rate.'
<td width="116">Duration <br> '.$No_Months.'
<td width="135">Amortization <br> '.$Amort_Type.'
</table>
</td>
</tr>
</table>
</body>
</html>';

if(mail($send_to,$subject,$email_body,$additional_headers)){ echo "SUCCESS!"; } ELSE { echo "FAILURE!"; }
?>

On a side note, your HTML is a little messed up (the second table), there's no <TR></TR> and you didn't close the table cells </TD>

Also, make sure the email program you're trying to view this in supports HTML;quote; height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="698" height="7209" valign="top">
<div align="justify">
<h1>Uniform Residential Loan Application </h1>
<p>This application is designed to be completed by the applicant(s) with the Lender\'s assistance.
Applicants should complete this form as "Borrower" or "Co-Borrower," as applicable.
Co-Borrower information must also be provided (and the appropriate box checked) when the income or
assets of a person other than the "Borrower" (including the Borrower\'s spouse) will be used
as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
basis for loan qualification, but his or her liabilities must be considered
because the Borrower resides in a community property state, the security
property is a location in a community property state, or the Borrower is relying on other property located
in a community property state as a basis for repayment of the loan.
</p>
</div>
<table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
<tr>
<td>
<div align="center">
<h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
</div>
</td>
</tr>
</table>
<br>
&am;;
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body =
'&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
&lt;tr&gt;
&lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;
&lt;div align=&quote;justify&quote;&gt;
&lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
&lt;p&gt;This application is designed to be completed by the applicant(s) with the Lender\'s assistance.
Applicants should complete this form as &amp;quot;Borrower&amp;quot; or &amp;quot;Co-Borrower,&amp;quot; as applicable.
Co-Borrower information must also be provided (and the appropriate box checked) when the income or
assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
basis for loan qualification, but his or her liabilities must be considered
because the Borrower resides in a community property state, the security
property is a location in a community property state, or the Borrower is relying on other property located
in a community property state as a basis for repayment of the loan.
&lt;/p&gt;
&lt;/div&gt;
&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div align=&quote;center&quote;&gt;
&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
&lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt; '.$Mort_Type.'
&lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt; '.$Amount.'
&lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt; '.$Int_Rate.'
&lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt; '.$No_Months.'
&lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt; '.$Amort_Type.'
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;';

if(mail($send_to,$subject,$email_body,$additional_headers)){ echo &quote;SUCCESS!&quote;; } ELSE { echo &quote;FAILURE!&quote;; }
?&gt;

On a side note, your HTML is a little messed up (the second"Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body =
'<html>
<head>
<title>Uniform Residential Loan Application</title>
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing=&quote;0&quote;&gt;
&lt;tr&gt;
&lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;
&lt;div align=&quote;justify&quote;&gt;
&lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
&lt;p&gt;This application is designed to be completed by the applicant(s) with the Lender\'s assistance.
Applicants should complete this form as &amp;quot;Borrower&amp;quot; or &amp;quot;Co-Borrower,&amp;quot; as applicable.
Co-Borrower information must also be provided (and the appropriate box checked) when the income or
assets of a person other than the &amp;quot;Borrower&amp;quot; (including the Borrower\'s spouse) will be used
as a basis for loan qualification or the income or assets of the Borrower\'s spouse will not be used as
basis for loan qualification, but his or her liabilities must be considered
because the Borrower resides in a community property state, the security
property is a location in a community property state, or the Borrower is relying on other property located
in a community property state as a basis for repayment of the loan.
&lt;/p&gt;
&lt;/div&gt;
&lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div align=&quote;center&quote;&gt;
&lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;table width=&quote;698&quote; border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
&lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt; '.$Mort_Type.'
&lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt; '.$Amount.'
&lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt; '.$Int_Rate.'
&lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt; '.$No_Months.'
&lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt; '.$Amort_Type.'
&amp

Posted: Sat Jul 16, 2005 6:26 am
by keress
Thanks so much for your help. Unfortunately, it's still coming through as code. I corrected the html and verified that my mail program had html. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
'
<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698" height="7209" valign="top"><div align="justify"> 
        <h1>Uniform Residential Loan Application </h1>
        <p >This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as "Borrower" 
          or "Co-Borrower," as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the "Borrower" (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. </p>
      </div>
      <table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
        <tr> 
          <td><div align="center"> 
              <h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
            </div></td>
        </tr>
      </table>
      <br>
   
    <table width=698 border="1" cellpadding="3" cellspacing="0">
	   <tr>
        <td width="211">Mortgage Applied For <br>
          '.$Mort_Type.' 
        <td width="90">Amount <br>
          '.$Amount.' 
        <td width="104">Int. Rate <br>
          '.$Int_Rate.' 
        <td width="116">Duration <br>
          '.$No_Months.' 
        <td width="135">Amortization <br>
          '.$Amort_Type.' 
		  </td>
		   </td>
		    </td>
			 </td>
			  </td>
			   </tr>
		  
		  </table> 
  
	  </td>
  </tr>
</table>
 </body>
</html>
';				


 if(!mail( "$send_to", "ASAsZXzsczxcZXC","$vars", "From:  <noreply@2hats.test>"))
 {
 echo "Your message could not be sent.  Please call our office at the number below\n";
 }
 else
  {
 echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
 }

			?>
s still coming through as code. I corrected the html and verified that my mail program had html. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = "linda@lkcwebdesign.com&quote;;
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body = 
'
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' 
		  &lt;/td&gt;
		   &lt;/td&gt;
		    &lt;/td&gt;
			 &lt;/td&gt;
			  &lt;/td&gt;
			   &lt;/tr&gt;
		  
		  &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
 &lt;/body&gt;
&lt;/html&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@2hats.test&gt;&quote;))
 {
 echo &quote;Your message could not be sent.  Please call our office at the numbeected the html and verified that my mail program had html. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = &quote;linda@lkcwebdesign.com&quote;;
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = "Loan Application";
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body = 
'
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' 
		  &lt;/td&gt;
		   &lt;/td&gt;
		    &lt;/td&gt;
			 &lt;/td&gt;
			  &lt;/td&gt;
			   &lt;/tr&gt;
		  
		  &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
 &lt;/body&gt;
&lt;/html&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@2hats.test&gt;&ahtml. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = &quote;Loan Application&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body = 
'
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' 
		  &lt;/td&gt;
		   &lt;/td&gt;
		    &lt;/td&gt;
			 &lt;/td&gt;
			  &lt;/td&gt;
			   &lt;/tr&gt;
		  
		  &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
 &lt;/body&gt;
&lt;/html&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@2hats.test&gt;&quote;))
 {
 echo &quote;Your messmy mail program had html. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
'
<html>
<head>
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' 
		  &lt;/td&gt;
		   &lt;/td&gt;
		    &lt;/td&gt;
			 &lt;/td&gt;
			  &lt;/td&gt;
			   &lt;/tr&gt;
		  
		  & your help.  Unfortunately, it's still coming through as code.  I  corrected the html and verified that my mail program had html. This is the code now:

Code: Select all

&lt;? //Who do you want this email to be sent to?

$send_to = &quote;linda@lkcwebdesign.com&quote;;
$recipient = &quote;linda@lkcwebdesign.com&quote;;
$subject = &quote;Loan Application&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body = 
'
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' 
		  &lt;/td&gt;
		   &lt;/td&gt;
		    &lt;/td&gt;
			 &lt;/td&gt;
			  &lt;/td&gt;
			   &lt;/tr&gt;
		  
		  &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
 &lt;/body&gt;
&lt;/html&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@2hats.test&gt;&quote;))
 {
 echo &quote;Your message could not be sent.  Please call our office at the number below\n&quote;;
 }
 else
  {
 echo &quote;Your message was sent.  Thank you for contacting us, we will be in touch shortly your help.  Unfortunately, it's still coming through as code.  I  corrected the html and verified that my mail program had html. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
'
<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698" height="7209" valign="top"><div align="justify"> 
        <h1>Uniform Residential Loan Application </h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
        ;lt;html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698" height="7209" valign="top"><div align="justify"> 
        <h1>Uniform Residential Loan Application </h1>
        <p >This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as "Borrower" 
          or "Co-Borrower," as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the "Borrower" (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. </p>
      </div>
      <table width="698" height="14" border="2" cellspacing="0" bgcolor="#CCFFFF">
        <tr> 
          <td><div align="center"> 
              <h2>I. TYPE OF MORTAGE AND TERMS OF LOAN</h2>
            </div></td>
        </tr>
      </table>
      <br>
   
    <table width=698 border="1" cellpadding="3" cellspacing="0">
	  pe: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698" height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&amrected the html and verified that my mail program had html. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
'
<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' 
		  &lt;/td&gt;
		   &lt;/td&gt;
		    &lt;/td&gt;
			 &lt;/td&gt;
			  &lt;/td&gt;
			   &lt;/tr&ampified that my mail program had html. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = &quote;linda@lkcwebdesign.com&quote;;
$recipient = &quote;linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body = 
'
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' 
		  &lt;/td&gt;
		   &lt;/td&gt;
		    &lt;/td&gt;
			 &lt;/td&gt;
			  &lt;/td&gt;
			   &lt;/tr&gt;
		  
		  &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
 &lt;/body&gt;
&lt;/html&gt;
';				


 if(!mail( &quote;$send_to&qucoming through as code.  I  corrected the html and verified that my mail program had html. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
'
<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&ampWho do you want this email to be sent to?

$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body = 
'
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' 
		  &lt;/td&gt;
		   &lt;/td&gt;
		    &lt;/td&gt;
			 &lt;/td&gt;
			  &lt;/td&gt;
			   &lt;/tr&gt;
		  
		  &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
 &lt;/body&gt;
&lt;/html&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@2hats.test&gt;&quote;))
 {
 echo &quote;Your message could not be sent.  Please call our office at the number below\n&quote;;
 }
 else
  {
 echo &quote;Your message was sent.  Thank you for contacting us, we willsubject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
'
<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
    Unfortunately, it's still coming through as code.  I  corrected the html and verified that my mail program had html. This is the code now:

Code: Select all

<? //Who do you want this email to be sent to?

$send_to = "linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
'
<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698" height="7209" valign="top"><div align="justify"> 
        <h1>Uniform Residential Loan Application </h1>
        <p >This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;quote;linda@lkcwebdesign.com";
$recipient = "linda@lkcwebdesign.com";
$subject = "Loan Application&quote;;
$additional_headers = &quote;From: linda@lkcwebdesign.com\r\n&quote;;
$additional_headers .=&quote;Content-type: text/html; charset=iso-8859-1\r\n&quote;;
$email_body = 
'
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Uniform Residential Loan Application&lt;/title&gt;
  $headers  = 'MIME-Version: 1.0' . &quote;\r\n&quote;;
$headers .= 'Content-type: text/html; charset=iso-8859-1' . &quote;\r\n&quote;;
&lt;/head&gt;
&lt;body&gt;
&lt;table width=&quote;700&quote; height=&quote;7211&quote; border=&quote;1&quote; align=&quote;center&quote; cellpadding=&quote;5&quote; cellspacing=&quote;0&quote;&gt;
  &lt;tr&gt; 
    &lt;td width=&quote;698&quote; height=&quote;7209&quote; valign=&quote;top&quote;&gt;&lt;div align=&quote;justify&quote;&gt; 
        &lt;h1&gt;Uniform Residential Loan Application &lt;/h1&gt;
        &lt;p &gt;This application is designed to be completed by the applicant(s) with 
          the Lender\'s assistance. Applicants should complete this form as &amp;quot;Borrower&amp;quot; 
          or &amp;quot;Co-Borrower,&amp;quot; as applicable. Co-Borrower information must 
          also be provided (and the appropriate box checked) when the income or 
          assets of a person other than the &amp;quot;Borrower&amp;quot; (including the 
          Borrower\'s spouse) will be used as a basis for loan qualification or 
          the income or assets of the Borrower\'s spouse will not be used as a 
          basis for loan qualification, but his or her liabilities must be considered 
          because the Borrower resides in a community property state, the security 
          property is a location in a community property state, or the Borrower 
          is relying on other property located in a community property state as 
          a basis for repayment of the loan. &lt;/p&gt;
      &lt;/div&gt;
      &lt;table width=&quote;698&quote; height=&quote;14&quote; border=&quote;2&quote; cellspacing=&quote;0&quote; bgcolor=&quote;#CCFFFF&quote;&gt;
        &lt;tr&gt; 
          &lt;td&gt;&lt;div align=&quote;center&quote;&gt; 
              &lt;h2&gt;I. TYPE OF MORTAGE AND TERMS OF LOAN&lt;/h2&gt;
            &lt;/div&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;br&gt;
   
    &lt;table width=698 border=&quote;1&quote; cellpadding=&quote;3&quote; cellspacing=&quote;0&quote;&gt;
	   &lt;tr&gt;
        &lt;td width=&quote;211&quote;&gt;Mortgage Applied For &lt;br&gt;
          '.$Mort_Type.' 
        &lt;td width=&quote;90&quote;&gt;Amount &lt;br&gt;
          '.$Amount.' 
        &lt;td width=&quote;104&quote;&gt;Int. Rate &lt;br&gt;
          '.$Int_Rate.' 
        &lt;td width=&quote;116&quote;&gt;Duration &lt;br&gt;
          '.$No_Months.' 
        &lt;td width=&quote;135&quote;&gt;Amortization &lt;br&gt;
          '.$Amort_Type.' 
		  &lt;/td&gt;
		   &lt;/td&gt;
		    &lt;/td&gt;
			 &lt;/td&gt;
			  &lt;/td&gt;
			   &lt;/tr&gt;
		  
		  &lt;/table&gt; 
  
	  &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
 &lt;/body&gt;
&lt;/html&gt;
';				


 if(!mail( &quote;$send_to&quote;, &quote;ASAsZXzsczxcZXC&quote;,&quote;$vars&quote;, &quote;From:  &lt;noreply@2hats.test&gt;&quote;))
 {
 echo &quote;Your message could not be sent.  Please call our office at the number below\n&quote;;
 }
 else
  {
 echo &quote;Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n&quote;;
 }

			?&gn Application";
$additional_headers = "From: linda@lkcwebdesign.com\r\n";
$additional_headers .="Content-type: text/html; charset=iso-8859-1\r\n";
$email_body = 
'
<html>
<head>
  <title>Uniform Residential Loan Application</title>
  $headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
</head>
<body>
<table width="700" height="7211" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr> 
    <td width="698" height="7209" valign="top"><div align="justify"> 
        <h1>Uniform Residential Loan Application </h1>
        <p >This application is designed to be completed by the applicant(s) with