PHPMailer is a PHP function package for sending emails. The functions it provides include: specifying multiple recipients, CC addresses, BCC addresses and reply addresses when sending emails. Supports multiple email encodings including: 8bit, base64, binary and quoted-printable. Supports SMTP verification. Supports Redundant SMTP server. Supports emails with attachments and emails in Html format. Customizable email headers. Supports embedding images in emails. Flexible debugging. Tested and compatible SMTP servers include: Sendmail, qmail, Postfix, Imail, Exchange, etc. Can run on any platform
PHP itself provides an email sending function mail, which can send emails directly in the program. However, this function requires the server to support sendmail or a mail sending server that does not require relay must be set up. But now we need to find one that does not require authentication. It is almost impossible to relay emails, so using the mail function often fails to send emails successfully.
If you are familiar with the SMTP protocol and combine it with the socket function, you can write an efficient and stable email sending program, but it is too difficult for ordinary users. Fortunately, there are already many email sending modules written by others on the Internet. We only need to download and simply call them, which is very convenient.