使用php发送邮件 [英] send mail using php

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

问题描述

朋友们,

我想用php发送邮件。但是我收到以下错误

警告:mail()[function.mail]:SMTP服务器响应:550 5.7.1无法中继



i我正在使用wamp服务器。所以我在wamp服务器上做了什么改变。所以我可以在我的本地主机上使用wamp服务器发送测试邮件。

解决方案

要使用PHP的内部命令发送电子邮件,你需要在你的服务器上配置一个smtp服务器计算机。

互联网上的图书馆将帮助您使用外部smtp服务器(例如gmail)配置和发送(假设您有一个帐户)。

尝试搜索PHP使用gmail发送电子邮件你将获得如下结果:

http://stackoverflow.com/questions/712392/send-email-using-gmail-smtp-server-from-php-page

< a href =http://stackoverflow.com/questions/10380051/how-do-i-send-email-using-gmail-through-mail-where-do-i-put-the-password> http:/ /stackoverflow.com/questions/10380051/how-do-i-send-email-using-gmail-through-mail-where-do-i-put-the-password

我使用phpmailer函数发送邮件在本地主机的PHP中。

以下链接用于发送邮件

http://www.vishalkumar.in/2009/06/php-mail-using-gmail-smtp-tutorial/ [ ^ ]


hi friends,
i want to send the mail using php. but i get the following error
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for

i am using wamp server. so what change i have done in wamp server. so i can send test mail using wamp server on my local host.

解决方案

To use the internal commands of PHP to send email you need to configure an smtp server on your computer.
There are libraries over the internet that will help you configure and send using external smtp servers such as gmail (assuming you have an account).
Try searching "PHP send email using gmail" and you`ll get result such as:
http://stackoverflow.com/questions/712392/send-email-using-gmail-smtp-server-from-php-page
http://stackoverflow.com/questions/10380051/how-do-i-send-email-using-gmail-through-mail-where-do-i-put-the-password


I use the phpmailer function for send mail in php in local host.
following link i use for send mail
http://www.vishalkumar.in/2009/06/php-mail-using-gmail-smtp-tutorial/[^]


这篇关于使用php发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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