3 ms·
It is 2017. Do not use mail() directly unless you completely understand how it works and its pitfalls (here, at least 2 vectors remain unsanitized). Instead, g
by Piskvorrr 10y ago
It is 2017. Do not use mail() directly unless you completely understand how it works and its pitfalls (here, at least 2 vectors remain unsanitized).
Instead, go for e.g. PhpMailer: it is a self-contained library which offers a significantly saner and safer interface for sending e--mails, while retaining all the flexibility. (Also, it is 2017: when you try sending HTML e-mails with mail() directly, your experience will be PAINFUL. Again, a library such as PhpMailer saves you from reinventing a 20-year-old wheel.) The amount of time I have personally saved by not touching mail() would be several man-months.