Page 2 of 2

Posted: Sat Jul 16, 2005 10:38 am
by s.dot

Code: Select all

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"; }
Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var")o", "ASAsZXzsczxcZXC","$vars", "From: <noreply@2hats.test>")) { echo "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;; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number belo","$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"; }
Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} elsrom:  <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"; }
Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message coquote;, "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"; }
Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch short
 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"; }
Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $v
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"; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var") sent. Thank you for contacting us, we will be in touch shortly.\n";
} else
{
echo "Your message could not be sent. Please call our office at the number below\n";
}


Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var") not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var")C","$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"; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the num;$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"; }
Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_heote;, "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"; }
Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var")o "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"; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statementor contacting us, we will be in touch shortly.\n"; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, "$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"; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var") office at the number below\n"; } else { echo "Your message was sent. Thank you for contacting us, we will be in touch shortly.\n&quote;; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$varl be in touch shortly.\n"; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var") at the number below\n";
}


Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var");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"; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number beloww\n"; } else  { echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n"; }
Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $v echo "Your message was sent. Thank you for contacting us, we will be in touch shortly.\n";
} else
{
echo "Your message could not be sent. Please call our office at the number below\n";
}


Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var")
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"; }


Where's your $vars coming from?

Try

Code: Select all

if(mail($send_to,$subject,$email_body,$additional_headers))
{
     echo "Your message was sent.  Thank you for contacting us, we will be in touch shortly.\n";
} else
{
      echo "Your message could not be sent.  Please call our office at the number below\n";
}
Also, do not put your variables inside of "" marks in your mail statement. use mail($var, $var, $var, $var) instead of mail("$var","$var","$var", $var")

Posted: Sun Jul 17, 2005 10:43 am
by keress
It worked! Thank you all so much. You're great.

Posted: Sun Jul 17, 2005 12:53 pm
by s.dot
I think your problem came when you put quotes around your variables like "$email_body"

When you put quotes around it, it's going to show the literal value of the variable, which is why it showed the code instead of being formatted in HTML.

Never put quotes around your variables unless of course, the literal value is what you want. :P

Posted: Sun Jul 17, 2005 1:28 pm
by keress
What about the sections of code I'm using with variables like this:

Code: Select all

<td width=\"211\">Mortgage Applied For <br> 
    '.$Mort_Type.'
Is that different than what you're talking about?

I found where I'd repeated the command

Code: Select all

\"Content-type: text/html; charset=iso-8859-1\r\n\";
in the wrong part of the page and wasn't sure if that's why it was failing to work.

Also, I'd like to call a CSS file, but it doesn't appear to come through. Will one work in this situation?riables like this:

Code: Select all

<td width=\"211\">Mortgage Applied For <br> 
    '.$Mort_Type.'
Is that different than what you're talking about?

I found where I'd repeated the command

Code: Select all

\"Content-type: text/html; charset=iso-8859-1\r\n\";
<td width=\"211\">Mortgage Applied For <br>
'.$Mort_Type.'


Is that different than what you're talking about?

I found where I'd repeated the command

Code: Select all

\"Content-type: text/html; charset=iso-8859-1\r\n\";
in the wrong part of the page and wasn't sure if that's why it was failing to work.

Also, I'd like to call a CSS file, but it doesn't appear to come through. Will one work in this situation?

Posted: Sun Jul 17, 2005 7:25 pm
by s.dot
keress wrote:What about the sections of code I'm using with variables like this:

Code: Select all

<td width="211">Mortgage Applied For <br> 
    '.$Mort_Type.'
That is fine as you are concatenating the variable. Although I believe in the example you were using it was not necessary, but certainly won't hurt anything.

As far as CSS goes, I've never used CSS in sending an email, so I wouldn't be able to help you out. Sorry! :)

Posted: Tue Jul 19, 2005 12:38 pm
by keress
I've been adding section by section to what will be a very long form. I've gotten to the seventh section, which it's choking on for some reason. I've isolated just this section. Can anybody see a problem? All that outputs in the email is 0 (zero) in the body of the message.

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>
<link href="mortgage.css" rel="stylesheet" type="text/css">
  <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 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" border="1" cellspacing="0">
        <tr> 
          <td bgcolor="#CCFFFF"><h2>VII. DETAILS OF TRANSACTION</h2></td>
        </tr>
      </table>
      <br> <table width="100%" border="0">
        <tr> 
          <td width="37%">a. Purchase price</td>
          <td width="13%"> <div align="right"> '.$PR_PURCHASE.' </div></td>
        </tr>
        <tr> 
          <td>b. Alterations, improvements, repairs</td>
          <td><div align="right"> '.$PR-ALTER.'</div></td>
        </tr>
        <tr> 
          <td>c. Land (if acquired separately)</td>
          <td><div align="right"> '.$PR_LAND.'</div></td>
        </tr>
        <tr> 
          <td>d. Refinance (incl. debts to be paid off)</td>
          <td><div align="right"> '.$PR_REFI.' </div></td>
        </tr>
        <tr> 
          <td>e. Estimated prepaid items</td>
          <td><div align="right"> '.$PR-PREPAID.'</div></td>
        </tr>
        <tr> 
          <td>f. &nbsp;Estimated closing costs</td>
          <td><div align="right"> '.$PR_CLOS_COST.'</div></td>
        </tr>
        <tr> 
          <td>g. PMI, MIP, Funding Fee</td>
          <td><div align="right"> '.$PR_PMI.' </div></td>
        </tr>
        <tr> 
          <td>h. Discount (if Borrower will pay)</td>
          <td><div align="right"> '.$PR-DISCOUNT.'</div></td>
        </tr>
        <tr> 
          <td>I.<strong> Total costs (add items a through h)</strong></td>
          <td><div align="right"> '.$PR-TOTAL.'</div></td>
        </tr>
        <tr> 
          <td>j. Subordinate financing</td>
          <td><div align="right"> '.$PR-SUBFI.'</div></td>
        </tr>
        <tr> 
          <td>k. Borrower\'s closing costs paid by Seller</td>
          <td><div align="right"> '.$PR-CLOS_COST.'</div></td>
        </tr>
        <tr> 
          <td>l. Other Credits (explain)</td>
          <td><div align="right"> '.$PR-OTHR_CRDTS.'</div></td>
        </tr>
      </table>
 
	  </td>
  </tr>
</table>
 </body>
</html>
';				


 if(mail($send_to,$subject,$email_body,$additional_headers))
 { 
     echo "Your message was sent.  Thank you for contacting us, 
        we will be in touch shortly.\n";} 
		else{      
		echo "Your message could not be sent.  Please call our office at the number below\n";
		}
			?>