我应该使用PHPMailer还是SwiftMailer? [英] Should I use PHPMailer or SwiftMailer?

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

问题描述

可能重复:
PhpMailer与Swiftmailer?

Possible Duplicate:
PhpMailer vs. Swiftmailer?

我一直使用PHP内置的mail()函数,它一直为我工作,而且没有失败,并且可以完成我想要的工作.

I have always used PHP's built in mail() function and it has always worked for me without fail and does the job I want it to.

现在有些人可能会想:为什么要修复未损坏的东西?".

Now some maybe thinking 'Why fix something that isn't broke ?'.

如果有人问,我对这些问题的回答是:

My answer to these in case someone asks is:

  • 我以前从未使用过框架,如果那是它们被分类的东西,或者也许它们被称为我不知道的库.

  • I have never used a framework before if that's what they are classified as or perhaps they are called a library I don't know.

我想开始使用它,并且仔细阅读了文档,而且看起来都很容易使用.

I want to start using one and have looked over the documentation and both seem very easy to use.

当我在自己的网站中实现新功能时,我的网站更多地依赖于发送电子邮件等,这意味着PHP的mail()函数不再能胜任工作.

As I implement new features into my site, my site is depending more on sending emails etc meaning PHP's mail() function is not up to the job any more.

在处理附件,html和文本版本等高级内容时,它们将更易于使用;否则使用PHP的mail()函数将很难或不可能.

They would be easier to use when dealing with advanced things like attachments, html and text versions etc; that would otherwise be difficult or impossible using PHP's mail() function.

我从未使用过SMTP,并且已经对其进行了研究,并且可以在托管程序包中将其与SSL一起使用.经过大量阅读后,看来不仅SMTP更可靠,使用更广泛,电子邮件也不太可能被标记为垃圾邮件,使用这两种框架都可以提高性能,可靠性和安全性,因为它使用SMTP和SSL.

I have never used SMTP, and I have looked into it and I can see I can use it along with SSL on my hosting package. After plenty of reading it seems that not only is SMTP more reliable and more widely used, emails are less likely to be marked as spam, using either of the frameworks will improve performance, reliability and more secure because it uses SMTP with SSL.

现在,我不确定使用SMTP还有什么其他好处,也许有人可以给我更多更好的理由?我正在寻找有关SMTP好处的更多信息.

Now I am not sure what the other benefits are using SMTP, maybe someone could give me some more reasons why it's better? I am looking to find out more information about SMTP benefits.

我看了两个文档,看了它们都提供的功能,在Google上搜索了PHPMailer vs SwiftMailer,但没有找到任何说明为什么一个比另一个更好的东西.

I have looked at both documentation looked at the features they both offer, searched google for PHPMailer vs SwiftMailer but not found anything saying why one is better than the other.

任何人都对他们有经验吗?

Does anyone have experience with any of them?

一个人比另一个人有更多好处吗?

Does one have more benefits than the other?

你会说一个比另一个更好吗?

Would you say one is better than the other?

我确实读过很多人说PHPMailer是一个死项目,但是那些帖子相对较旧.查看PHPMailer的网站,看来该项目已经并且已经重新开发了一段时间.

I did read a lot of people saying PHPMailer was a dead project but those posts was relatively old. Looking at PHPMailer's website it seems the project is and has been back in development for some time now.

感谢您可以在PHPMailer和/或SwiftMailer上提供的任何内容.希望我可以决定一个或另一个,因为目前我没有理由为什么要选择一个.

Thanks for anything you can provide on either PHPMailer and/or SwiftMailer. Hopefully I can decide on one or the other as at the moment I have no reason on why I would choose one over the other.

推荐答案

我在项目中使用了PHPMailer,对此没有任何抱怨.尚未使用Swiftmailer,但两者的用法和实用性似乎几乎相同,只是实现细节有所不同.当您了解它时,它们都是友好的界面,可以向您隐藏SMTP电子邮件的详细信息.

I've used PHPMailer for my projects and have no complaints about it. Haven't used Swiftmailer, but both seem to be pretty much the same in terms of usage and usefulness, differing only in implementation details. When you get right down to it, they're both just friendly interfaces to hide the details of SMTP email from you.

选择风格最适合您的人,然后选择它.

Pick whichever one whose style suits you best and go with it.

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

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