我对通过 PHP 代码发送电子邮件的选项还很陌生。可用的选项有 sendmail、postfix 和 PHPMail。如果我使用sendmail和postfix,这意味着我必须使用PHP的邮件功能。我不知道PHPMail。我将跨域发送电子邮件(hotmail、yahoo、gmail 等)。这是在用户完成某些操作(例如注册)后自动发送到用户电子邮件的电子邮件。大家对此有何看法?
我尝试在 Ubuntu 服务器中设置 sendmail,但在设置过程中遇到了一些困难。所以这就是为什么我可能正在寻找更多选择。
I am pretty new with the options of sending email via PHP code. The options available are sendmail, postfix, and PHPMail. If I use sendmail and postfix this means that I have to use PHP's mail function. I don't know about PHPMail. I will be sending email across domains (hotmail, yahoo, gmail, etc). It's an automatic email sent to a user's email after they completed something (say a registration). What do you guys think about this?
I've tried setting up sendmail in my Ubuntu server, but had some difficulties in setting it up. So that's why I am probably looking for more options.
发布评论
评论(2)
在 ubuntu 上设置 sendmail 应该很容易
http://ubuntuforums.org/showthread.php ?t=196112
这提供了安装 sendmail 所需的基础知识。
如果您在家里或某个非数据中心运行此服务器,则您的 ISP 可能会阻止您需要的端口号,例如端口 25。
通读该线程,它应该会为您可能遇到的问题提供一些好的建议。
You should have a pretty easy time setting up sendmail on ubuntu
http://ubuntuforums.org/showthread.php?t=196112
This gives the basics it takes to get sendmail installed.
If you are running this server from your house or some non-datacenter there is a chance that your ISP is blocking the port numbers you need such as port 25.
Read through that thread and it should give you some good suggestions for issues you may have.
您的计算机上需要 MTA(邮件传输代理)(sendmail、postifx 等),或者您可以使用 SMTP。
如果您不使用任何框架,PHPMailer 可能是一个发送电子邮件的好类。
PHPMailer 位于 Google 代码 和 GitHub。
You need a MTA (mail transport agent) on your machine (sendmail, postifx, ...) or you can connect to a mail provider like gmail using SMTP.
PHPMailer might be a good class for sending emails if you're not using any framework.
PHPMailer is on Google Code and GitHub.