private function clearAttachments($dir)
    {
        if (!file_exists($dir)) {
            mkdir($dir, 0777, true);
        }

        $files = glob($dir.'/*');
        foreach ($files as $file) {
            if (is_file($file)) {
                unlink($file);
            }
        }
    }
private function clearAttachments($dir)
    {
        if (!file_exists($dir)) {
            mkdir($dir, 0777, true);
        }

        $files = glob($dir.'/*');
        foreach ($files as $file) {
            if (is_file($file)) {
                unlink($file);
            }
        }
    }
private function clearAttachments ( $ dir ) { if ( ! file_exists ( $ dir ) ) { mkdir ( $ dir , 0777 , true ) ; } $ files = glob ( $ dir . '/*' ) ; foreach ( $ files as $ file ) { if ( is_file ( $ file ) ) { unlink ( $ file ) ; } } }
Clear all previous email attachments
Clear all previous email attachments