1
我有一個帶有inmotion託管的VPS,並且我發送了一封確認郵件,但是它發送的郵件太多了,當我發送郵件時,如何構建html代碼的最佳方式,如何我可以提高表現嗎?PHP郵件發送速度很慢
這是我的代碼。
$subject = 'Mail activation';
$body = '
<html>
<head>
<base target="_blank">
</head>
<body>
<table style="max-width:800px; margin:0 auto; font-family: Arial, Helvetica, sans-serif;" cellspacing="0" cellpadding="10">
<thead style="border-bottom:1px solid #DDD;">
<tr>
<td align="center" style="border-bottom:1px solid #DDD;">
<img src="http://p.unid.com/img/logoSASENegro.png" alt="" height="45" width="150"/>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
Hi classmate
</td>
</tr>
<tr>
<td>
Press the following link.
</td>
</tr>
<tr>
<td>
www.google.com
</td>
</tr>
<tr>
<td>
You data:
</td>
</tr>
<tr>
<td>
ID - <b>'.$ids.'</b><br/>
Password - <b>'.$pass.'</b><br/>
</td>
</tr>
<tr>
<td>
Don't response this email.
</td>
</tr>
</tbody>
</table>
</body>
</html>
';
$headers = "MIME-Version: 1.0\r\n";
$headers .="Content-type: text/html; charset=utf-8\r\n";
$headers .= "From: Contacto SASE <[email protected]>\r\n";
if(mail($emailC, $subject, $body, $headers))
您的語法錯誤。看看'不要回復這封電子郵件'。你的字符串在那裏結束 – Joshua
性能與服務器/ MTA設置有關,而不是代碼。 (→關題)。考慮一個郵件類和一個適當的SMTP中繼。 – mario