duankang8114 2010-04-08 22:57
浏览 37
已采纳

PHP中的基本联系表单

I'm working on a contact form for my church website.

The church has an email already registered (it's POP3) and the hosting company says their mail server is mymail.brinkster.com .

With all that information, how can you send the form using mail()? The server won't show PHP errors. The current code looks like this:

    $headers = 'MIME-Version: 1.0' . "
";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
    $headers .= 'From: *ChurchsEmail*' . "
";

if(mail("*MyEmailHere*", "Setting Up PHP Email", "This would be the body of the email.", $headers))
{
        echo "The email was successfully sent.";
} else {
        echo "The email was NOT sent.";
}

All I get back is "The email was NOT sent."

So does anyone have any experience setting up an email form like this? My thanks to anyone who can help me out and any efficient ways of doing this, let me know!

  • 写回答

3条回答 默认 最新

  • dongrou839975 2010-04-08 23:23
    关注

    I was searching through their support database and found out how to get email working. It told me to include a server-file called "class.phpmailer.php"

    Article for Brinkster users.

    Thanks everyone for the help!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?