在发送电子邮件与PHP的问题 [英] problem at send an email with php

查看:99
本文介绍了在发送电子邮件与PHP的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个html页面,用php发送带有操作的设置方法的电子邮件,这是我的php代码:

I made a html page to send an email with php an set method with action an this is my php code:

<?php
    $name=$_POST['name'];
    $email=$_POST['email'];
    $feedback=$_POST['feedback'];
    $toaddress='test@yahoo.com';
    $subject='Feedback from web site';
    $mailcontent='Customer name: '.$name."\n"
    .'Customer Email: '.$email."\n"
    .'customer content: '."\n".$feedback."\n";
    $fromaddress='From: test@yahoo.com';
    mail($toaddress,$subject,$mailcontent,$fromaddress);
?>


但是当我要运行此程序时,我无法发送电子邮件,并且看到以下消息:
警告:mail()[function.mail]:无法通过"localhost"端口25连接到邮件服务器,无法验证php.ini中的"SMTP"和"smtp_port"设置,或在D:\ xampp \ htdocs \中使用ini_set()第13行的Chapter1 \ feedback.php
有什么问题,请帮我


but when I want to run this I cant send email and I see this message:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\xampp\htdocs\chapter1\feedback.php on line 13
what is the problem please help me

推荐答案

name =


_POST [' 名称'];
_POST['name'];


email =


这篇关于在发送电子邮件与PHP的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆