English 中文(简体)
使用SMTP(与phpmailer一起)用PHP发送电子邮件是一种好的做法吗。?
原标题:Is it good practice to use SMTP (with phpmailer) to send emails with PHP.?

我刚开始使用PhpMailer,所以我不得不决定是否要使用SMTP、sendmail、qmail。。。我一直在PHP中使用简单的mail()函数,从未真正想过它。

一种方法是更好、更可靠、更简单,还是更适合特定的任务。?(邮件、附件等)

我在我的电脑(wamp)上开发,网站总是在Unix服务器上。

谢谢

最佳回答

如果您在MSWindows上进行开发,那么使用带有CLI接口的本地MTA是不寻常的,即您可能必须使用SMTP。使用SMTP并不意味着您不能使用本地MTA,使用本地MTA也不意味着您不能向世界发送电子邮件。

我建议使用本地MTA(或至少在您的网络上使用一个)-它为您提供了更大的电子邮件策略管理控制权(例如SPF、添加签名等)。但是,如果您在MSWindows上进行开发,那么您不希望在生产站点上运行明显不同的代码——因此,请使用SMTP连接进行开发,但要使用自己的MTA。

问题回答

暂无回答




相关问题
Angle brackets in php

I want to store angle brackets in a string in PHP because i want to eventually use mail() to send an HTML email out. The following is the code that doesn t seem to work. while(...) { $msg .= "<...

authlogic auto_register feature using my options

I have auto registration working with authlogic using gaizka s version of authlogic_openid which I found on Github since pelle s original addition of the feature seemed to cause issues. http://...

Zend 邮件问题,涉及外国char子+ com子

泽斯德邮局在名称被定为具有外国性质(如“保”)和 com(”)的物品时,就放弃了一种例外(因为邮局(邮局)退回假)。 重新提出以下守则。

How to track an email in Java?

How I can track an email? I m using java on the server side for sending emails. I want to track whether it is delivered , opened, etc... How I can do that ?

Web Link in a mail is not rendering as link in yahoo

string from = "abc@gmail.com"; string to = "xyz@gmail.com,xyz@yahoo.co.in"; string password="abcxyz"; MailMessage mail = new System.Net.Mail.MailMessage(); mail.To.Add(to); mail.From = new ...

SharePoint - Approaching Website Storage Limit Email

How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it s size limit? Thanks for your ...

How to create an email mailing list

Im creating a coming soon page for a website im developing, and im adding an option for the user to enter their email address so we can email them when the site is up. How do I do this?

CCNet email does not include MSBuild results

We re using CCNet 1.4.4.83 but when an MSBuild task fails, we don t get the MSBuild results (i.e. missing file or whatever reason the compile failed) in the email notification. I do see the build ...

热门标签