简体   繁体   English

发送PHP邮件

[英]Sending PHP mail

I would like to send this email. 我想发送这封电子邮件。

I have seen configuration but not sure what to do or make any heads or tails out of them. 我已经看过配置,但不确定该怎么做或从中做出任何正面或反面。 The mail would be sent from my PC right now. 该邮件将立即从我的PC发送。

Error I get is - Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\\wamp\\www\\send.php on line 165. 我得到的错误是-无法在“ localhost”端口25上连接到邮件服务器,无法验证php.ini中的“ SMTP”和“ smtp_port”设置,或在第165行的C:\\ wamp \\ www \\ send.php中使用ini_set() 。

http://www.cyberciti.biz/tips/howto-php-send-email-via-smtp-authentication.html http://forums.devshed.com/mail-server-help-111/how-to-set-up-php-ini-to-send-mail-from-106329.html http://www.cyberciti.biz/tips/howto-php-send-email-via-smtp-authentication.html http://forums.devshed.com/mail-server-help-111/how-to-set -up-php-ini-to-send-mail-from-106329.html

Looked on these two sites from google search but don't acutally understand it. 从谷歌搜索看了这两个网站,但并不了解。 Can some help me please. 请给我一些帮助。

You're trying to send mail from your localhost (Your PC) It's not setup to send mail. 您正在尝试从本地主机(您的PC)发送邮件。未设置发送邮件。 Move the script to a production server and it will work 将脚本移到生产服务器上,它将起作用

You don't have a mail server installed. 您没有安装邮件服务器。 You have a few options: 您有几种选择:

  1. Install a mail server such as Postfix or sendmail 安装邮件服务器,例如Postfix或sendmail
  2. Connect to an existing SMTP server, for example through Gmail. 例如通过Gmail连接到现有的SMTP服务器。 (See: Send email using the GMail SMTP server from a PHP page ) (请参阅: 从PHP页面使用GMail SMTP服务器发送电子邮件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM