为什么在PHP中使用mail()函数时不显示消息?

时间:2013-05-25 03:29:36

标签: php html email

这可能是一个noob问题,但是嘿,我是一个菜鸟,所以在这里。当我尝试使用mail()函数发送电子邮件时,该消息不会出现。

实例:enter link description here

这是我的HTML代码:

<div id="column-wide">
        <!-- DIV to push bottom of page down -->
        <div style="height: 430px">
      <div id="generic-container">

      <!--*********DO NOT EDIT ABOVE THIS LINE**********-->

<h1>Contact us!</h1>

<p>You can contact us at admin@viddir.com OR you can use our special mail press below.</p>

<br />
<form method="post" action="contactus.php">
    <textarea type="text" id="message" name="message"></textarea>
    <br />
    <input class="btn" type="submit" value="send" name="submit" />
</form>

      <!--*********DO NOT EDIT BELOW THIS LINE**********-->

      </div>
        </div>
    </div>

PHP代码:

<?php
$to = "juggernaut1776@gmail.com";
$subject = "Message from Viddir";
$msg = $POST__['message'];

mail($to, $subject, $msg);
?>

1 个答案:

答案 0 :(得分:1)

更改

$msg = $POST__['message'];

$msg = $_POST['message'];