2013-11-27 7 views
0

Почему я должен использовать класс почтовой программы, такой как PHPMailer, вместо простой функции PHP mail? Есть ли проблема с безопасностью или спамом?Зачем использовать аутентификацию SMTP

Единственная причина, по которой я не хочу использовать PHPMailer, заключается в том, что почтовый пароль отображается в исходном коде. Используя простую функцию mail, я избегаю этой проблемы.

Благодаря

ответ

1

С PHPMailer вы можете работать лучше с заголовками, HTML-почты и т.д. Функция почта является основным способом.

В любом случае, я предлагаю вам swiftmailer, имеет лучшую поддержку и является более современным.

0
PHPMailer is a PHP class for PHP (www.php.net) that provides a package of functions to send email. The two primary features are sending HTML Email and e-mails with attachments. PHPMailer supports nearly all possiblities to send email: mail(), Sendmail, qmail & direct to SMTP server. You can use any feature of SMTP-based e-mail, multiple recepients via to, CC, BCC, etc. In short: PHPMailer is an efficient way to send e-mail within PHP. 

As you may know, it is simply to send mails with the PHP mail() function. So why use PHPMailer? Isn't it slower? Yes that's true, but PHPMailer makes it easy to send e-mail, makes it possible to attach files, send HTML e-mail, etc. With PHPMailer you can even use your own SMTP server and avoid Sendmail routines used by the mail() function on Unix platforms. 

Reference: 
http://code.google.com/a/apache-extras.org/p/phpmailer/wiki/UsefulTutorial