从本地主机发送邮件 [英] Send e mails from localhost
本文介绍了从本地主机发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从 localhost 发送电子邮件,而不使用域。使用 php xampp 。是否有任何可能的方法?
I want to send emails from localhost, without using a domain. using php xampp. is there a any possible way of doing it?
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: xxx@example.com' . "\r\n";
mail("xxx@gmail.com", "subject", "body", $headers);
推荐答案
如果您使用Linux,请安装Sendmail或Postfix你的系统。或者在Windows中使用此软件: http://www.softstack.com/freesmtp.html
If you are using Linux, install Sendmail or Postfix in your system. Or in Windows use this software : http://www.softstack.com/freesmtp.html
这篇关于从本地主机发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文