http://webprojects.co/dev_wed/mail.php PHPのメールを使用してメールを送信することができません私は、サーバーからメールを送信することができていないのですが、このスクリプトを使用して、サーバーからメールを送信しようとしている()関数
<?php
$to = "[email protected]";
$subject = "HTML email";
$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>
";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From: <[email protected]>' . "\r\n";
$headers .= 'Cc: [email protected]' . "\r\n";
$result = mail($to,$subject,$message,$headers);
if(!$result) {
echo "Error";
} else {
echo "Success";
}
?>
「エラー」の正確な理由など詳細を調べてみましたか? – emaillenin
私は試しましたが、結論は得られていません。あなたは正確な問題を見つけるためにどのような方法を提案することができます@emillillen –