Here is all I could think of in one sitting, forgive me if there are any glaring omissions.
Advantages to using PHP's built-in mail function, no external library/wrapper:
- You don't need anything outside of
PHP.
- You don't need to learn a new API.
- You don't have to worry about a PHP
upgrade or such breaking the script.
- You don't have to worry about an
updated version not working on your
PHP installation.
- You don't have to worry about
potential security vulnerabilities as
a result of using that script.
- If it's a simple task, you'll be done
in a few minutes.
Advantages to using an external library/wrapper:
- If you need to introduce more
complexity into your emailing, you
can do so quite easily. Adding
attachments, inline images and such
are not much fun using PHP plain mail
function. External libraries (at
least the good ones) have a more
OOPish API. Adding an attachment can be as easy as
$message->addAttachment($file); without having to play around with headers, etc.
- External libraries better hide the
ugly complexities of tasks such as
adding attachments, character
encodings and inline images.
- Using a library now will save you the
hassle of having to learn it in the
future when you do need the
additional complexity/functionality.
- External libraries probably (I'm
really not sure which ones, and to
what extent) address certain
vulnerabilities that PHP's mail does
not.
If I can think of anything else, I'll be sure to add it.