通过 PHP 发送电子邮件的选项

发布于 2024-10-31 19:47:08 字数 268 浏览 9 评论 0 原文

我对通过 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

べ繥欢鉨o。 2024-11-07 19:47:09

在 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.

猫七 2024-11-07 19:47:08

您的计算机上需要 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文