PhpMailer 与 SwiftMailer? [英] PhpMailer vs. SwiftMailer?

查看:29
本文介绍了PhpMailer 与 SwiftMailer?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个相当简单的 PHP 脚本,需要发送一些带有附件的电子邮件.我找到了这两个库来做到这一点.

I'm building a fairly simple PHP script that will need to send some emails with attachments. I've found these 2 libraries to do this.

其中一个比另一个有明显的优势吗?或者我应该随机选择一个然后完成它?

Does either one have significant advantages over the other? Or should I just pick one at random and be done with it?

推荐答案

我想说 PHPMailer 不再被开发,而 Swift Mailer 是.但是当我用谷歌搜索时......

I was going to say that PHPMailer is no longer developed, and Swift Mailer is. But when I googled ...

https://github.com/PHPMailer/PHPMailer

这表明它正在再次工作.

That suggests its being worked on again.

我经常使用 PHPMailer,它一直很可靠.由于上述原因,我最近开始使用 Swift Mailer,它也没有给我带来任何麻烦.

I've used PHPMailer a lot, and its always been solid and reliable. I had recently started using Swift Mailer, for the above reason, and it too has given me no trouble.

现在PHPMailer又被开发出来了,我想我可能会尝试一下新版本.

Now that PHPMailer is developed again, I think I'll probably give the new version a try.

所以,我的回答是两者都有能力,而且没有那么重要——选择一个,学习它,使用它.两者都比 mail() 提供了巨大的优势,并抽象出电子邮件的细微差别,以便您可以继续进行真正尝试开发的内容.

So, my answer is that both are capable, and that it doesn't matter that much – choose one, learn it, use it. Both offer massive advantages over mail() and abstract away the nuances of email so that you can get on with whatever you are really trying to develop.

这篇关于PhpMailer 与 SwiftMailer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆