我正在通过本地主机上的 php 邮件功能发送一封长 HTML 电子邮件。它一直被切断,我不知道为什么。
以下是生成截断电子邮件的代码:
$message = "<html><body>";
$message .= "<table rules=\"all\" style=\"border-color: #666;\" cellpadding=\"10\">";
$message .= "<tr><td colspan='2'>Application</td></tr>";
$message .= "<tr><td colspan='2'> </td></tr>";
$message .= "<tr><td colspan='2'>Personal Information</td></tr>";
$message .= "<tr><td>Name</td><td>{$fullname}</td></tr>";
$message .= "<tr><td>Gender</td><td>{$_POST['gender']}</td></tr>";
$message .= "<tr><td>Address</td><td>{$home_address}</td></tr>";
$message .= "<tr><td>Phone</td><td>{$_POST['primary-phone']}</td></tr>";
$message .= "<tr><td>Email</td><td>{$_POST['primary-email']}</td></tr>";
$message .= "<tr><td colspan='2'><p> </p></td></tr>";
$message .= "<tr><td colspan='2'>School Info</td></tr>";
$message .= "<tr><td>Address</td><td>{$school_address}</td></tr>";
$message .= "<tr><td>Phone</td><td>{$school_phone}</td></tr>";
$message .= "<tr><td colspan='2'> </td></tr>";
$message .= "<tr><td colspan='2'>Describe Yourself</td></tr>";
$message .= "<tr><td>Marital Status</td><td>{$_POST['marital-status']}</td></tr>";
$message .= "<tr><td>Spouse's Name</td><td>{$_POST['partner-name']}</td></tr>";
$message .= "<tr><td>College Degree?</td><td>{$_POST['college-degree']}</td></tr>";
$message .= "<tr><td>Graduation Year</td><td>{$_POST['grad-year']}</td></tr>";
$message .= "<tr><td>College Name</td><td>{$_POST['college-name']}</td></tr>";
$message .= "<tr><td>College Major</td><td>{$_POST['major']}</td></tr>";
$message .= "<tr><td colspan='2'> </td></tr>";
$message .= "<tr><td colspan='2'>Employment Info</td></tr>";
$message .= "<tr><td>Employer Name</td><td>{$_POST['current-employer']}</td></tr>";
$message .= "<tr><td>Date Employed</td><td>{$_POST['date-employed']}</td></tr>";
$message .= "<tr><td>Employer Address</td><td>{$employer_address}</td></tr>";
$message .= "<tr><td colspan='2'> </td></tr>";
//and on and on for another 40 lines
这是生成的电子邮件代码:
<html><body><table rules="all" style="border-color: #666;" cellpadding="10"><tr><td colspan='2'>Application</td></tr><tr><td colspan='2'> </td></tr><tr><td colspan='2'>Personal Information</td></tr><tr><td>Name</td><td>Blake</td></tr><tr><td>Gender</td><td>male</td></tr><tr><td>Address</td><td>My Street<br>Town, IN 12345</td></tr><tr><td>Phone</td><td>555-555-5555</td></tr><tr><td>Email</td><td>my.email@gmail.com</td></tr><tr><td colspan='2'><p> </p></td></tr><tr><td colspan='2'>School Info</td></tr><tr><td>Address</td><td>my street<br>my town, IN 12345</td></tr><tr><td>Phone</td><td>555-555-5555</td></tr><tr><td colspan='2'> </td></tr><tr><td colspan='2'>Describe Yourself</td></tr><tr><td>Marital Status</td><td>married</td></tr><tr><td>Spouse's Name</td><td>Emily</td></tr><tr><td>College Degree?</td><td>yes</td></tr><tr><td>Graduation Year</td><td>2008</td></tr><tr><td>College Name</td><td>Purdue</td></tr>
正如您所看到的(或者可能不取决于格式),即使有更多信息,电子邮件也会在大学名称之后被切断。
有什么问题?$message 太大?本地邮件服务器发送太快?(我正在使用随 XAMPP 一起安装的 Mercury)
谢谢