Yii CEmailValidator now checking MX records

Yii 1.1.11 was released a few weeks ago, sporting a number of bug fixes and enhancements.  One improvement in particular caught my eye.  In the past, if you used the checkPort functionality in CEmailValidator, it wouldn’t always work as intended.

For instance, Hollow Developers uses Google Apps to manage our mail server, so we have no mail server listening on our domain.  CEmailValidator’s old processing would fail for our domain because the validation was very simple – it only looked to see if a mail server was up and running on the email address’ domain.  As more and more domains use third-party services for mail, more and more domains would fail.  Obviously, this rendered this validation as fairly useless.  As of 1.1.11, however, the checkPort functionality is smart enough to look at the domain’s DNS MX records and look for a mail server at those locations.

We wanted to write a blog post about this since there are a few comments at the bottom of the CEmailValidator page that are out of date, and may confuse some people.  We hope this helps someone so they won’t have to dig through the release notes or validation source code.

Share this page:
  • Facebook
  • Twitter
  • Reddit
  • Google Bookmarks
  • email
  • Print
  • RSS
  • Digg
  • StumbleUpon
  • del.icio.us
  • Slashdot
  • Technorati
  • Tumblr

Steven Michaels

Steven Michaels specializes in PHP web applications utilizing MediaWiki, WordPress, Yii Framework and others. He is an open source contributor and leads development for both of Hollow Developers' internal projects, HollowGame and SpeechEase.

Facebook comments:

Leave a Reply