开发者

Which is the best way to send email using PHP [duplicate]

This question already has answers here: Closed 11 years ago.

Possibl开发者_如何学Ce Duplicate:

What is the best practice to send emails from PHP script?

I would like to setup an email application, which is the best method to use in sending emails through PHP and make sure that emails sent through the application is not considered SPAM?


I strongly recommend using some mature PHP class, which solves many problems you would encounter. Such example of a quality PHP mailer library could be PHPMailer


mail();

If you have sendmail configured, otherwise

PHPMailer

Anyway you can't be sure you will not get in the SPAM folder. Just alert your users to check that folder.


There is no way you can be sure your mail won't be considered SPAM. And I would recommend swiftmailer

  • Send emails using SMTP, sendmail, postfix or a custom Transport implementation of your own
  • Support servers that require username & password and/or encryption
  • Protect from header injection attacks without stripping request data content
  • Send MIME compliant HTML/multipart emails
  • Use event-driven plugins to customize the library
  • Handle large attachments and inline/embedded images with low memory use
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜