2 comments

[ 2.8 ms ] story [ 7.3 ms ] thread
I like how the sending code totally ignores any response from the SMTP server. You have no idea if it even accepts EHLO, and you have no idea if your message is queued successfully.

I also hope you don't put data from the user into this class. If your email address contains ">\r\n" and some SMTP commands, your PHP script just became an open relay.

There are a multitude of very well established projects making the sending of email trivial in PHP. This feels like re-inventing the wheel for the sake of a blog post.

Also, for me personally, I think you're going too far over towards self-promotion. There is nothing wrong with self-promotion but save it for your best articles rather than submitting every article you put together.