Is there anything better than PHPMailer?

by Andy Prevost

Saturday December 16 2023

Yes, there is. It's the next generation, PHPMailer2.

I should know, I was the sole author of the original PHPMailer starting with a major re-write in version 2.0.0 on November 7 2007 – all the way through to version 5.1 in use until at least July 28 2011. Those versions of PHPMailer were maximized for the then-current versions of PHP – and the Message Transfer Agents (MTAs) available at that time. By the way, PHPMailer is a Message Transfer Class, or a bridge to an MTA.

Why did I stop at version 5.1? Health forced the change. At that time, I was diagnosed with a pancreas disorder. In a period of less than six months, I lost 112 lbs. and became a pancreatic diabetic. I had to stop working on open source projects and nearly lost my business. I have now regained health to a point where I can get involved in open source again. Business and work-wise, I am pretty much fully retired (means my wife and I are pensioned off). My focus is now a photography hobby, a little bit of ebike stuff, and open source projects.

I read some of the support forums for PHPMailer. Horrific for the most part.

What is needed is a complete re-evaluation of mail transport classes. There remains a need for a quality mail transport class.

Let me give you some examples where I see shortfalls in PHPMailer.

When the original PHPMailer was released, the standard port used for sending emails was 25. Today, port 25 is associated with mail relays (and rejected by most servers). Next was port 465. Port 465 was registered for SMTPS, meaning SMTP over SSL. Port 465 is now reassigned for different use and deprecated. The current widely used port is 587 supporting TLS. Another mention is 2525 that also supports TLS. If the ports are already defined, why must a user configure?

If a user inputs an SMTP server, SMTP username and SMTP password, why also force that user to also configure "isSMTP"?

Why would an author denigrate PHP's mail() function and its foibles as a way to drive users to PHPMailer – yet have the default transport in PHPMailer as PHP's mail() function? PHP mail() is a very simplistic wrapper for Sendmail ... why not use Sendmail? SMTP is fairly simple to use, why not default to SMTP? PHPMailer2 does.

 

 

 

◀ Previous Next ▶

Post a Comment