Moving to GitHub.
[platal.git] / modules / email.php
index f6ad6b2..b78cfe7 100644 (file)
@@ -867,6 +867,7 @@ class EmailModule extends PLModule
                 sort($broken_list);
 
                 foreach ($broken_list as $email) {
+                    $email = trim($email);
                     $userobj = null;
                     if ($user = mark_broken_email($email, true)) {
                         $userobj = User::getSilentWithUID($user['uid']);
@@ -917,7 +918,7 @@ class EmailModule extends PLModule
 
                 // Output the list of users with recently broken addresses,
                 // along with the count of valid redirections.
-                pl_cached_content_headers('text/x-csv', 1);
+                pl_cached_content_headers('text/x-csv', null, 1, 'broken.csv');
 
                 $csv = fopen('php://output', 'w');
                 fputcsv($csv, array('nom', 'promo', 'bounces', 'nbmails', 'url', 'corps', 'job', 'networking'), ';');