tweaked invalid email script
This commit is contained in:
@@ -31,9 +31,14 @@ while($line = fgets($input)) {
|
||||
$email = trim($line);
|
||||
if(!$email) continue;
|
||||
|
||||
$bounce_email = $email;
|
||||
|
||||
if($email == '\303\274hilipp.bendieck@web.de') $email = "ühilipp.bendieck@web.de";
|
||||
if($email == 'benjamin@frie\303\237.at') $email = "benjamin@frieß.at";
|
||||
if($email == 'daniela.l\303\266scher@gmx.net') $email = "daniela.löscher@gmx.net";
|
||||
if($email == "-@") $email = "-";
|
||||
if($email == "gudrun_theisl@oan.at") $email = "gudrun_theisl@aon.at";
|
||||
if($email == "266hrermaximilian@gmail.com") $email = "zöhrermaximilian@gmail.com";
|
||||
|
||||
$search = [
|
||||
"customer_number" => true,
|
||||
@@ -42,11 +47,13 @@ while($line = fgets($input)) {
|
||||
if(!AddressModel::count($search)) {
|
||||
fwrite(STDERR, "=== $email not found!\n");
|
||||
}
|
||||
|
||||
|
||||
foreach(AddressModel::search($search) as $address) {
|
||||
if($address->email != $email) continue;
|
||||
|
||||
$kunu = $address->customer_number;
|
||||
$name = trim($address->getCompanyOrName());
|
||||
$name = str_replace(["\r\n", "\n", "\r"], " ", str_replace('"',"\"", trim($address->getCompanyOrName(true))));
|
||||
$street = trim($address->street);
|
||||
$zip = trim($address->zip);
|
||||
$city = trim($address->city);
|
||||
@@ -57,7 +64,7 @@ while($line = fgets($input)) {
|
||||
$csv .= '"'.$zip.'";';
|
||||
$csv .= '"'.$city.'";';
|
||||
$csv .= '"'.$address->email.'";';
|
||||
$csv .= '"'.$email.'"'."\n";
|
||||
$csv .= '"'.$bounce_email.'"'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user