Search code examples
phpphpmailerswiftmailer

Is PHP Mail Function Best For a Big Project?


Thanks for attention.I just need to know is mail() function best and secure for big a project. Project consist on subscriptions, confirmation process etc .Many developers use PHPMailer and SwiftMailer . What is really big difference between them.if php mail() function best then tell the reason why ?

Your answer will be highly appreciated


Solution

  • PHPMailer or Swiftmailer just take care of everything you have to take care of when you're sending an e-mail. You could use mail() for that but you'd have to do this all by yourself. Setting the right headers for example. Or composing an HTML-mail.

    mailer-classes are just a much more comfortable way to send e-mails and you can be sure not to get marked as spam or anything like that. I'd rely on one anytime.