-1

我创建了一个具有多个 IP 地址的服务器。通过 PHP 还创建了一个通讯系统。如何从所有服务器 IP 发送电子邮件?我必须安装几个 MTA 吗?还是通过 PHP 代码来做到这一点?

4

1 回答 1

1

Please, please don't attempt to run your own MTA. While setting an MTA is trivial, setting up an MTA which is secure and reliable is very, VERY difficult. That you need to ask to ask a question like this shows you have a lot of learning ahead of you before you have the requisite skills.

You don't need a seperate MTA for each IP address. You don't need a separate MTA for each MX domain.

It's very unusual to buy low-end internet connectivity for hosting without getting supporting such as DNS and mail thrown in. If your provider already offers these, then use the services there. If they are not provided, then there are lots of expert third party companies out there (although do beware that many of them exit to support UBE).

If you are using a remote MTA and are running PHP on anything other than MSWindows then you have 2 choices:

1) use a SMTP capable PHP mail library (e.g. swiftmailer)

or

2) install a rudimentary mail relay such as nullmailer on the Linux/Unix host.

于 2015-09-09T11:54:55.220 回答