mail function

PHP's mail() vs PHPMailer

As I had to build an online platform that started as a very small project, I was not concerned with using anything other than PHP's built in mail() function to send simple e-mails to the users - and it worked great! However, as the platform got larger, the requirements got larger too. Before long I was messing around with headers in the php mail() function to include attachments in e-mails etc. Turns out, adding the PHPMailer functionality makes the whole process a lot cleaner and easier to maintain as the project grows. By a simple function addAttachment($attachment) you hide the complexity and it even solved additional problems with ascii codings in mails. So if you have any idea that a project grows, think about planning ahead using a tested library. It would have saved me quite some trouble.

How to send an eMail via PHP?

The core problem of this challenge is to find an existing PHP-function, which enables a programmer to send an eMail. Furthermore, the correct syntax and the required data of the mail-function is an essential problem.
Subscribe to mail function