0

我有一个提交并发送两封电子邮件的表格:一封电子邮件给客户确认,另一封电子邮件给我的销售人员。

给客户的电子邮件工作正常,并在电子邮件正文中显示在表单中输入的姓名和电子邮件

发给我的销售人员的电子邮件列出了表格中输入的信息。但是,当电子邮件发送到我的销售电子邮件地址时,电子邮件的正文显示为空白。

HTML:

<form id="RFQ" method="post" action="RFQ-result.php">
        <h1 align="center">Request a Quote</h1>
         <table width="640" border="0" cellpadding="2" align="center">
           <tr>
             <td height="32" colspan="6"><strong>PROJECT INFORMATION</strong></td>
             </tr>
           <tr>
             <td width="14">&nbsp;</td>
             <td width="120" align="right">Project Name:</td>
             <td colspan="4"><span id="spryProjectName">
               <input name="ProjectName" type="text" id="ProjectName" size="50" />
               <span class="textfieldRequiredMsg">*</span></span></td>
        </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="right"><label for="Company2">Company:</label></td>
             <td colspan="4"><span id="spryCompany">
               <input name="Company" type="text" id="Company" size="40" />
               <span class="textfieldRequiredMsg">*</span></span></td>
        </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="right">Address:</td>
             <td colspan="4"><span id="spryAddress">
               <input name="Address" type="text" id="Address" size="50" />
               <span class="textfieldRequiredMsg">*</span></span></td>
        </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="right">City: </td>
             <td><span id="spryCity">
               <input type="text" name="City" id="City" />
               <span class="textfieldRequiredMsg">*</span></span></td>
             <td width="1">&nbsp;</td>
             <td width="135" align="right">State / Province:</td>
             <td width="154"><span id="spryState">
               <input type="text" name="State" id="State" />
               <span class="textfieldRequiredMsg">*</span></span></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="right">Postal Code:</td>
             <td width="178"><span id="spryZip">
               <input name="Zip" type="text" id="Zip" size="10" maxlength="6" />
               <span class="textfieldRequiredMsg">*</span></span></td>
             <td>&nbsp;</td>
             <td align="right">Country: </td>
             <td><input type="text" name="Country" id="Country" /></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="right">&nbsp;</td>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
             <td align="right">&nbsp;</td>
             <td>&nbsp;</td>
           </tr>
         </table>
         <table width="640" border="0" cellpadding="2" align="center">
           <tr>
             <td height="32" colspan="6"><strong>CONTACT INFORMATION</strong></td>
           </tr>
           <tr>
             <td width="15">&nbsp;</td>
             <td width="121" align="right">First Name:</td>
             <td width="173"><span id="spryFirstName">
               <input name="FirstName" type="text" id="FirstName" size="20" />
               <span class="textfieldRequiredMsg">*</span></span></td>
             <td width="1">&nbsp;</td>
             <td width="89" align="right">Last Name:</td>
             <td width="203"><span id="spryLastName">
               <input type="text" name="LastName" id="LastName" />
               <span class="textfieldRequiredMsg">*</span></span></td>
        </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="right">Phone:</td>
             <td><span id="spryPhone">
               <input name="Phone" type="text" id="Phone" size="20" />
               <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
             <td>&nbsp;</td>
             <td align="right"><label for="Mobile2">Mobile:</label></td>
             <td><span id="spryMobile">
               <input name="Mobile" type="text" id="Mobile" size="20" />
               <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">*Invalid format</span></span></td>
        </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="right">E-mail: </td>
             <td colspan="4"><span id="spryEmail">
             <input name="Email" type="text" id="Email" size="40" />
             <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">*</span></span></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="right">&nbsp;</td>
             <td colspan="4">&nbsp;</td>
        </tr>
        </table>
         <table width="640" border="0" cellpadding="2" align="center">
           <tr> </tr>
         </table>
         <table width="640" border="0" cellpadding="2" align="center">
           <tr>
             <td height="33" colspan="5"><strong>STANDARD CONFIGURATION</strong></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td width="156" colspan="2" align="right">Location of Drive:</td>
             <td width="437" colspan="2"><span id="spryDriveCity">
               <label for="DriveCity"></label>
               <input type="text" name="DriveCity" id="DriveCity" />
               <span class="textfieldRequiredMsg">*</span></span>, <span id="spryDriveState">
                 <label for="DriveState"></label>
                 <input type="text" name="DriveState" id="DriveState" />
                 <span class="textfieldRequiredMsg">*</span></span></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">Temperature Range:</td>
             <td colspan="2"><span id="spryMinTemp">
               <label for="MinTemp"></label>
               <input name="MinTemp" type="text" id="MinTemp" size="5" />
               -       <span class="textfieldRequiredMsg">*</span></span><span id="spryMaxTemp">
                 <label for="MaxTemp"></label>
                 <input name="MaxTemp" type="text" id="MaxTemp" size="5" />
                 <span class="textfieldRequiredMsg">*</span></span> °C</td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">Altitude:</td>
             <td colspan="2"><span id="spryAltitude">
               <label for="Altitude"></label>
               <input name="Altitude" type="text" id="Altitude" size="5" />
               <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format</span></span> ft</td>
             </tr>
           <tr>
             <td width="15">&nbsp;</td>
             <td colspan="2" align="right"><label for="PumpType">Type of Application:</label></td>
             <td colspan="2"><span id="spryPumpType">
               <select name="PumpType" id="PumpType">
                 <option> </option>
                 <option value="Beam Pump">Beam Pump</option>
                 <option value="Progressive Cavity Pump">Progressive Cavity Pump</option>
                 <option value="Rotaflex Pump">Rotaflex Pump</option>
                 <option value="Submersible Pump">Submersible Pump</option>
                 <option value="Surface Centrifugal Compressor">Surface Centrifugal Compressor</option>
                 <option value="Surface Centrifugal Pump">Surface Centrifugal Pump</option>
                 <option value="Surface Reciprocating Compressor">Surface Reciprocating Compressor</option>
                 <option value="Surface Reciprocating Pump">Surface Reciprocating Pump</option>
                 </select>
               <span class="selectRequiredMsg">*</span></span></td>
        </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">Drive Manufacturer:</td>
             <td colspan="2"><span id="spryManufacturer">
               <label for="Manufacturer"></label>
               <input name="Manufacturer" type="text" id="Manufacturer" size="25" />
               <span class="textfieldRequiredMsg">*</span></span></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">Model No:</td>
             <td colspan="2"><span id="spryModel">
               <label for="Model3"></label>
               <input name="Model" type="text" id="Model3" size="20" />
               <span class="textfieldRequiredMsg">*</span></span></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">Speed Range:</td>
             <td colspan="2"><span id="sprytextfield18">
               <label for="MinSpeed"></label>
               <input name="MinSpeed" type="text" id="MinSpeed" size="10" />
               <span class="textfieldRequiredMsg">*</span></span> - <span id="spryMaxSpeed">
                 <label for="MaxSpeed"></label>
                 <input name="MaxSpeed" type="text" id="MaxSpeed" size="10" />
                 <span class="textfieldRequiredMsg">*</span></span> ft/sec</td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">Input Voltage:</td>
             <td colspan="2"><span id="spryInputVoltage">
               <label for="InputVoltage"></label>
               <select name="InputVoltage" id="InputVoltage">
                 <option> </option>
                 <option value="200-240 VAC Input">200-240 VAC Input</option>
                 <option value="380-500 VAC Input">380-500 VAC Input</option>
                 <option value="525-690 VAC Input">525-690 VAC Input</option>
                 </select>
               <span class="selectRequiredMsg">*</span></span></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">Input Phase:</td>
             <td colspan="2"><span id="spryInputPhase">
               <select name="InputPhase" id="InputPhase">
                 <option> </option>
                 <option value="Single Phase">Single Phase</option>
                 <option value="Three Phase">Three Phase</option>
                 </select>
               <span class="selectRequiredMsg">*</span></span></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">Frequency:</td>
             <td colspan="2"><span id="spryFrequency">
               <label for="Frequency"></label>
               <input name="Frequency" type="text" id="Frequency" size="10" />
               <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> Hz</td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">kW:</td>
             <td colspan="2"><span id="sprykW">
               <label for="kW"></label>
               <input name="kW" type="text" id="kW" size="10" />
               <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">HP:</td>
             <td colspan="2"><span id="spryHP">
               <label for="HP"></label>
               <input name="HP" type="text" id="HP" size="5"/>
               <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">kVA:</td>
             <td colspan="2"><span id="sprykVA">
               <label for="kVA"></label>
               <input name="kVA" type="text" id="kVA" size="5" width="75"/>
               <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">Amps:</td>
             <td colspan="2"><span id="spryAmps">
               <label for="Amps3"></label>
               <input name="Amps" type="text" id="Amps3" size="5" width="75"/>
               <span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span> </span></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="right">&nbsp;</td>
             <td colspan="2">&nbsp;</td>
             </tr>
           </table>
         <table width="640" border="0" cellpadding="2" align="center">
           <tr>
             <td height="32" colspan="5" align="left"><strong>OPTIONS</strong></td>
           </tr>
           <tr>
             <td width="14">&nbsp;</td>
             <td colspan="4" align="left">Enclosure &amp; Environment Options:</td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td width="237"><input type="checkbox" name="Shield" id="Shield" />
               <label for="Shield">Sun/Snow Sheild</label></td>
             <td width="15">&nbsp;</td>
             <td width="327"><input type="checkbox" name="ColdKit" id="ColdKit" />
               <label for="ColdKit">Cold Weather Kit (-40 to -50 °C)</label></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td><input type="checkbox" name="WallStand" id="WallStand" />
               <label for="WallStand">Wall Mounting Stand</label></td>
             <td>&nbsp;</td>
             <td><input type="checkbox" name="HeatKit" id="HeatKit" />
               <label for="HeatKit">Heat Trace Kit</label></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td><input type="checkbox" name="FloorBase" id="FloorBase" />
               <label for="FloorBase">Floor Mounting Base</label></td>
             <td colspan="2">&nbsp;</td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td width="15" align="left">&nbsp;</td>
             <td>&nbsp;</td>
             <td colspan="2">&nbsp;</td>
        </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="left">Input:</td>
             <td colspan="2">Output:</td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td><input type="checkbox" name="PowerKit" id="PowerKit" />
               <label for="PowerKit">Power Terminal Kit.</label></td>
             <td>&nbsp;</td>
             <td><input type="checkbox" name="MotorKit" id="MotorKit" />
               <label for="MotorKit">Motor Terminal Kit</label></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td><input type="checkbox" name="Harmonic" id="Harmonic" />
               <label for="Harmonic">Harmonic Filter Enclosure</label></td>
             <td>&nbsp;</td>
             <td><input type="checkbox" name="SineFilter" id="SineFilter" />
               <label for="SineFilter">Sine Filter Enclosure</label></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="left">&nbsp;</td>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="left">VFD:</td>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td colspan="3"><input type="checkbox" name="Fieldbus" id="Fieldbus" />
               <label for="Fieldbus">Fieldbus Networks</label></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td colspan="3"><input type="checkbox" name="ControlKit" id="ControlKit" />
               <label for="ControlKit">Control Terminal Kit</label></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td colspan="3"><input type="checkbox" name="General" id="General" />
               <label for="General">General Purpose I/O, 3DI, 2DO, 2AI, 1AO</label></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td colspan="3"><input type="checkbox" name="Relay" id="Relay" />
               <label for="Relay">Relay Option, 3RO, 240Vac, 2A</label></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td colspan="3"><input type="checkbox" name="DCSupply" id="DCSupply" />
               <label for="DCSupply">24 V Ext. DC Supply Connector</label></td>
             </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td>&nbsp;</td>
             <td colspan="2">&nbsp;</td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td colspan="2" align="left">Operation &amp; Support:</td>
             <td colspan="2">&nbsp;</td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td align="left">&nbsp;</td>
             <td colspan="3"><input type="checkbox" name="iCM" id="iCM" />
               <label for="iCM">SALT iCM (remote access internect control module)</label></td>
             </tr>
         </table>
         <blockquote>
           <p align="right">
             <input name="Submit" type="submit" id="Submit" value="Submit"/>
           </p>
         </blockquote>

</form>

PHP:

    <?php
$ProjectName = $_POST['ProjectName'];
$Company = $_POST['Company'];
$Address = $_POST['Address'];
$City = $_POST['City'];
$State = $_POST['State'];
$Zip = $_POST['Zip'];
$Country = $_POST['Country'];
$FirstName = $_POST['FirstName'];
$LastName = $_POST['LastName'];
$Phone = $_POST['Phone'];
$Mobile = $_POST['Mobile'];
$Email = $_POST['Email'];

$DriveCity = $_POST['DriveCity'];
$DriveState = $_POST['DriveState'];
$MinTemp = $_POST['MinTemp'];
$MaxTemp = $_POST['MaxTemp'];
$Altitude = $_POST['Altitude'];
$PumpType = $_POST['PumpType'];
$Manufacturer = $_POST['Manufacturer'];
$Model = $_POST['Model'];
$MinSpeed = $_POST['MinSpeed'];
$MaxSpeed = $_POST['MaxSpeed'];
$InputVoltage = $_POST['InputVoltage'];
$InputPhase = $_POST['InputPhase'];
$Frequency = $_POST['Frequency'];
$kW = $_POST['kW'];
$HP = $_POST['HP'];
$kVA = $_POST['kVA'];
$Amps = $_POST['Amps'];

$Shield = $_POST['Shield'];
$WallStand = $_POST['WallStand'];
$FloorBase = $_POST['FloorBase'];
$ColdKit = $_POST['ColdKit'];
$HeatKit = $_POST['HeatKit'];

$PowerKit = $_POST['PowerKit'];
$Harmonic = $_POST['Harmonic'];
$MotorKit = $_POST['MotorKit'];
$SineFilter = $_POST['SineFilter'];

$Fieldbus = $_POST['Fieldbus'];
$ControlKit = $_POST['ControlKit'];
$General = $_POST['General'];
$Relay = $_POST['Relay'];
$DCSupply = $_POST['DCSupply'];

$iCM = $_POST['iCM'];


//Sending Email to form owner
$header = "From: $Email\n"
. "Reply-To: $Email\n";
$subject = "SALT RFQ";
$email_to = "sales@pmcsalt.com";
$message = "Project Name: $ProjectName\n" . "Company: $Company\n" . "Address: $Address\n" . "City: $City\n" . "State: $State\n" . "Zip: $Zip\n" . "Country: $Country\n" . "First Name: $FirstName\n" . "Last Name: $LastName\n" . "Phone: $Phone\n" . "Mobile: $Mobile\n" . "Email: $Email\n" . 

"Drive City: $DriveCity\n" . 
"Drive State: $DriveState\n" . 
"Min Temp: $MinTemp\n" . 
"Max Temp: $MaxTemp\n" . 
"Altitude: $Altitude\n" . 
"Application Type: $PumpType\n" . 
"Manufacturer: $Manufacturer\n" . 
"Model: $Model\n" . 
"MinSpeed: $MinSpeed\n" . 
"MaxSpeed: $MaxSpeed\n" . 
"InputVoltage: $InputVoltage\n" . 
"InputPhase: $InputPhase\n" . 
"kW: $kW\n" . 
"HP: $HP\n" . 
"kVA: $kVA\n" . 
"Amps: $Amps\n" . 

"Sun/Snow Shield: $Shield\n" . 
"Wall Mounting Stand: $WallStand\n" . 
"Floor Mounting Base: $FloorBase\n" . 
"Cold Weather Kit: $ColdKit\n" . 
"Heat Trace Kit: $HeatKit\n" . 

"Power Terminal Kit: $PowerKit\n" . 
"Harmonic Filter Enclosure: $Harmonic\n" . 
"Motor Terminal Kit: $MotorKit\n" . 
"Sine Filter Enclosure: $SineFilter\n" . 

"Fieldbus Networks: $Fieldbus\n" . 
"Control Terminal Kit: $ControlKit\n" . 
"General Purpose I/O, 3DI, 2DO, 2AI, 1AO: $General\n" . 
"Relay Option, 3RO, 240Vac, 2A: $Relay\n" . 
"24 V Ext. DC Supply Connector: $DCSupply\n" . 

"SALT iCM: $iCM\n" . 

mail($email_to, $subject ,$message ,$header ) ;

//Sending Confirmation Email to Client
$header = "From: sales@pmcsalt.com\n"
. "Reply-To: sales@pmcsalt.com\n";
$subject = "SALT RFQ";
$email_to = "$Email";
$message = "Dear $FirstName $LastName,\n \n We have received your pricing request for $ProjectName. One of our sales representatives will be with you within 48 hours to discuss pricing for your custom application.\n \n Thank you for chosing Power Management Controls!! \n \n \n";
mail($email_to, $subject ,$message ,$header ) ;

?>
4

1 回答 1

2

您没有正确终止您的连接:

"24 V Ext. DC Supply Connector: $DCSupply\n" . 

"SALT iCM: $iCM\n" . 

mail($email_to, $subject ,$message ,$header ) ;

这应该是:

24 V Ext. DC Supply Connector: $DCSupply\n" . 

"SALT iCM: $iCM\n";

mail($email_to, $subject ,$message ,$header ) ;

目前,您$message在拨打电话时没有收到任何信息mail()

于 2012-10-03T16:09:22.623 回答