Re: [Postfixadmin-devel] Request for help to creating bulk email address
Brought to you by:
christian_boltz,
gingerdog
From: Sonam P. <s_p...@ru...> - 2012-01-11 12:17:36
|
Hello, Creation of bulk email address is almost complete. Procedure of email creation are the following: 1. Uploading and reading CSV file as usual 2. Printing the status of CSV file 3. creating the email address by taking care of maximum_execution time Regrading number three: I self-redirect after creating certain mailboxes with ?csvfile=uploaded_file.csv&continue_with_line=51 before 5 seconds of maximum execution time as recommended by Mr. Christian Boltz (Thank You very much). For this simple re-direction I am using simple header php function, I don't know whether this method is correct??. Your help or recommendation would be helpful. As I am coding directly base on SVN trunk, I using the MailBoxHandler class. The following piece of code is used to create email address using the separate class: $i = $this -> continue_with_line; $bulkMail = $_SESSION["user"]; foreach ($bulkMail["user"] as $mail => $username) { if(is_array($username)) { $MailHandler = new MailboxHandler($usernam[$i]["username"]); if (!$MailHandler->add($usernam[$i]["password"], $name, $quota, $active, $mail)) { die ('creating the mailbox failed - ' . $handler->errormsg); } unset($_SESSION["user"][$i]); $i++; } } As you can notice from the above piece of code that I am creating multiple instances / constructor ( $MailHandler = new MailboxHandler($usernam[$i]["username"]) within the loop, Do I need to call destructor method after creating every mail box (If so then need to create destructor function in the MailboxHandler class) or leave it as it is or other suggestions. I would appreciate if you could provide recommendations or suggestions or advice to complete the above task. Thank You Sonam Penjor -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |