This is a custom PHPlist code based on its 3.0.6 version