我正在测试一个PHP电子邮件脚本,该脚本基本上会发回用户在电子邮件中以表单形式输入的信息。出于某种原因,大约2/3降低$ Body,“\ n”退出某些行为我工作。我试过“\ r \ n”也无济于事。奇怪的是它适用于大多数脚本而不是最后一部分。我已经从我的脚本和电子邮件结果中包含了$ BODY标记的下三分之一。
$Body .= "Calculation for Payback in Months: ";
$Body .= "\n";
$Body .= "M.E. Cost Per Fixture: ";
$Body .= $MECostFixture;
$Body .= "\n";
$Body .= "Annual Savings per Fixutre per Year: ";
$Body .= $SavingsFixtureYearF;
$Body .= "\r\n";
$Body .= "Payback in Months: ";
$Body .= $PaybackMonthsF;
$Body .= "\n";
$Body .= "\n";
$Body .= "Calculation for Return on Investment (ROI): ";
$Body .= "\n";
$Body .= "Annual Savings per Fixutre per Year: ";
$Body .= $SavingsFixtureYearF;
$Body .= "\n";
$Body .= "M.E. Cost Per Fixture: ";
$Body .= $MECostFixture;
$Body .= "\n";
$Body .= "Return on Investment: ";
$Body .= $ROIF;
以下是电子邮件下半部分返回的示例: 这也来自Outlook。
Calculation for Payback in Months:
M.E. Cost Per Fixture: 243.25
Annual Savings per Fixutre per Year: 16.71 Payback in Months: 174.7
Calculation for Return on Investment (ROI):
Annual Savings per Fixutre per Year: 16.71 M.E. Cost Per Fixture: 243.25 Return on Investment: 6.87
以下是所需的结果
Calculation for Payback in Months:
M.E. Cost Per Fixture: 243.25
Annual Savings per Fixutre per Year: 16.71
Payback in Months: 174.7
Calculation for Return on Investment (ROI):
Annual Savings per Fixutre per Year: 16.71
M.E. Cost Per Fixture: 243.25
Return on Investment: 6.87