add dashboard mailbox, added usage log, pending-switch email, mailbox history, email history

This commit is contained in:
Gitea
2025-05-04 19:39:53 +05:30
parent 6e2a750c4e
commit 3b9967a749
15 changed files with 1129 additions and 112 deletions

View File

@@ -318,100 +318,3 @@ class ZEmail extends Model
}
}
// public static function createCustomEmail($username, $domain): string
// {
// $username = str_replace('[^a-zA-Z0-9]', '', strtolower($username));
// $forbidden_ids = json_decode(config('app.settings.configuration_settings'))->forbidden_ids ?? [];
// $gmail_usernames = json_decode(config('app.settings.configuration_settings'))->gmailUsernames ?? [];
// if (in_array($username, $forbidden_ids)) {
// return ZEmail::generateRandomEmail(true);
// }
// $zemail = new ZEmail();
// if($domain == "gmail.com") {
//
// if(str_contains($username, "+")){
// $check_username = explode("+", $username)[0];
// $post_username = explode("+", $username)[1];
// if (in_array($check_username, $gmail_usernames)) {
// $email = $username . '@gmail.com';
// ZEmail::storeEmail($email);
// return $email;
// } else {
//
// $email = $zemail->getRandomGmailUser().'+'.$post_username.'@gmail.com';
// ZEmail::storeEmail($email);
// return $email;
// }
// }
// elseif(str_contains($username, ".")){
// $check_username = str_replace(".","",$username);
//
// if (in_array($check_username, $gmail_usernames)) {
// $email = $username . '@gmail.com';
// ZEmail::storeEmail($email);
// return $email;
// } else {
//
// $email = $zemail->generateRandomGmail();
// ZEmail::storeEmail($email);
// return $email;
// }
//
// }
// else {
//
// $email = $zemail->getRandomGmailUser().'+'.$username.'@gmail.com';
// ZEmail::storeEmail($email);
// return $email;
// }
// } elseif($domain == "googlemail.com") {
// if(str_contains($username, "+")){
// $check_username = explode("+", $username)[0];
// $post_username = explode("+", $username)[1];
//
// if (in_array($check_username, $gmail_usernames)) {
// $email = $username . '@googlemail.com';
// ZEmail::storeEmail($email);
// return $email;
// } else {
//
// $email = $zemail->getRandomGmailUser().'+'.$post_username.'@googlemail.com';
// ZEmail::storeEmail($email);
// return $email;
// }
// }
// elseif(str_contains($username, ".")){
// $check_username = str_replace(".","",$username);
//
// if (in_array($check_username, $gmail_usernames)) {
// $email = $username . '@googlemail.com';
// ZEmail::storeEmail($email);
// return $email;
// } else {
//
// $email = $zemail->generateRandomGmail();
// ZEmail::storeEmail($email);
// return $email;
// }
// }
// else {
// $email = $zemail->getRandomGmailUser().'+'.$username.'@googlemail.com';
// ZEmail::storeEmail($email);
// return $email;
// }
// } else {
// $domains = json_decode(config('app.settings.configuration_settings'))->domains ?? [];
// if (in_array($domain, $domains)) {
// $email = $username . '@' . $domain;
// ZEmail::storeEmail($email);
// return $email;
// } else {
// $email = $username . '@' . $domains[0];
// ZEmail::storeEmail($email);
// return $email;
// }
//
// }
// }